diff --git a/custom_components/nature_remo/api.py b/custom_components/nature_remo/api.py index 613e2c3..f75185a 100644 --- a/custom_components/nature_remo/api.py +++ b/custom_components/nature_remo/api.py @@ -61,7 +61,7 @@ async def get(self, api: Api): except ImportError: pass try: - response = await loop.run_in_executor(None, blocking_get, url) + response = await loop.run_in_executor(None, blocking_get, self.session, url) except Exception as err: raise NetworkError from err else: @@ -85,7 +85,7 @@ async def post(self, api: Api, params: list[str], data: dict): except ImportError: pass try: - response = await loop.run_in_executor(None, blocking_post, url, data) + response = await loop.run_in_executor(None, blocking_post, self.session, url, data) except Exception as err: raise NetworkError from err else: