fix token exp check

This commit is contained in:
Ole Bittner 2024-07-07 22:47:26 +02:00
parent 3fca94ff29
commit 3cb164cae0
Signed by: obittner
GPG Key ID: 51C6E3916445D6B2
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ class ReosCoordinator(DataUpdateCoordinator):
hass,
_LOGGER,
name="Reos Locks",
update_interval=timedelta(seconds=30),
update_interval=timedelta(hours=24),
)
self.api = api

View File

@ -78,7 +78,7 @@ class ReosApi:
def __is_token_valid(self, token: str) -> bool:
try:
jwt.decode(token, options={"verify_signature": False})
token = jwt.decode(token, options={"verify_signature": False, "verify_exp": True}, verify=True)
return True
except jwt.ExpiredSignatureError:
return False