Skip to content

Commit

Permalink
Fix updating token every single API request (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinty authored Sep 8, 2024
1 parent 5d5bc7f commit 827535a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/sberdevices/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ async def update_token(self) -> None:
token = await self._sber.fetch_home_token()
if token is not None:
self._client.headers.update({"X-AUTH-jwt": token})
self._token_alive = True

async def request(
self, method: str, url: str, retry: bool = True, **kwargs
Expand Down

0 comments on commit 827535a

Please sign in to comment.