Skip to content

Commit

Permalink
fix #98
Browse files Browse the repository at this point in the history
  • Loading branch information
marq24 committed Aug 13, 2024
1 parent b8b3c10 commit 71017be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/senec/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/marq24/ha-senec-v3/issues",
"requirements": ["xmltodict>=0.12.0", "packaging>=21.0", "python-dateutil>=2.8.0"],
"version": "2024.8.2"
"version": "2024.8.3"
}
5 changes: 2 additions & 3 deletions custom_components/senec/pysenec_ha/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2348,7 +2348,7 @@ def __init__(self, user, pwd, web_session, master_plant_number: int = 0, options

self.web_session: aiohttp.websession = web_session

if _require_lib_patch:
if _require_lib_patch():
if hasattr(aiohttp.helpers, "get_running_loop"):
loop = aiohttp.helpers.get_running_loop(web_session.loop)
elif hasattr(asyncio, "get_running_loop"):
Expand Down Expand Up @@ -2461,7 +2461,7 @@ def __init__(self, user, pwd, web_session, master_plant_number: int = 0, options
_LOGGER.debug("APP-API: will query WALLBOX data (cause 'lala_cgi._QUERY_WALLBOX_APPAPI' is True)")

def check_cookie_jar_type(self):
if _require_lib_patch:
if _require_lib_patch():
if hasattr(self.web_session, "_cookie_jar"):
old_jar = getattr(self.web_session, "_cookie_jar")
if type(old_jar) is not MySenecCookieJar:
Expand Down Expand Up @@ -3765,7 +3765,6 @@ def clear_jar(self):


@staticmethod
@property
def _require_lib_patch() -> bool:
need_patch = version.parse(aiohttp.__version__) < version.parse("3.9.0")
if need_patch:
Expand Down

0 comments on commit 71017be

Please sign in to comment.