Skip to content

Commit 49382c6

Browse files
Fix restoring session
1 parent cb69986 commit 49382c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/tauron_amiplus/connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ async def try_restore_session(self, service: str) -> (bool, str | None, ClientSe
219219
store = Store(self._hass, STORAGE_VERSION, f"{self._storage_key}_{slugify(service)}")
220220
stored_data = await store.async_load()
221221
if stored_data is None:
222-
return False, None
222+
return False, None, session
223223
cookies = {k: v for k, v in stored_data.get("cookies", {}).items() if k in ["PHPSESSID", "ASP.NET_SessionId"]}
224224
self.log(f"COOKIES ({service}): {cookies}")
225225
session.cookie_jar.clear(lambda x: True)

0 commit comments

Comments
 (0)