diff --git a/custom_components/reos_integration/coordinator.py b/custom_components/reos_integration/coordinator.py index 0329aac..3d7d474 100644 --- a/custom_components/reos_integration/coordinator.py +++ b/custom_components/reos_integration/coordinator.py @@ -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 diff --git a/custom_components/reos_integration/reos_api.py b/custom_components/reos_integration/reos_api.py index f5ebd14..7d97b33 100644 --- a/custom_components/reos_integration/reos_api.py +++ b/custom_components/reos_integration/reos_api.py @@ -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