Skip to content

Commit

Permalink
fix: correct datetime comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
cdnninja committed May 30, 2024
1 parent b6a7b1b commit ceac270
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions yoto_api/YotoManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,7 @@ def check_and_refresh_token(self) -> bool:
self.initialize()
return True
# Check if valid and correct if not
<<<<<<< Updated upstream
if self.token.valid_until - timedelta(hours=1) <= datetime.datetime.now(
pytz.utc
):
=======
if self.token.valid_until - timedelta(hours=1) <= datetime.now(pytz.utc):
>>>>>>> Stashed changes
_LOGGER.debug(f"{DOMAIN} - access token expired")
self.token: Token = self.api.refresh_token(self.token)
if len(self.mqtt_client.keys()) != 0:
Expand Down

0 comments on commit ceac270

Please sign in to comment.