Skip to content

Commit

Permalink
Fixed issue #8 and #25 (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
rberkel authored Jun 25, 2024
1 parent 46cecbf commit 7d8a8b3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions homeconnect/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,13 @@ def token_load(self):
token = json.load(f)
now = int(time.time())
token["expires_in"] = token.get("expires_at", now - 1) - now
self._oauth = OAuth2Session(
client_id=self.client_id,
redirect_uri=self.redirect_uri,
auto_refresh_kwargs={"client_id": self.client_id, "client_secret": self.client_secret},
token=token,
token_updater=self.token_updater,
)
return token

def token_expired(self, token):
Expand Down

0 comments on commit 7d8a8b3

Please sign in to comment.