From 3f0ea9d708a6710612ef425c790d3738681086d0 Mon Sep 17 00:00:00 2001 From: Daniel Raper Date: Fri, 29 Dec 2023 12:09:20 +0000 Subject: [PATCH] Remove debug logging --- custom_components/ohme/api_client.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/custom_components/ohme/api_client.py b/custom_components/ohme/api_client.py index 1dca681..14687d4 100644 --- a/custom_components/ohme/api_client.py +++ b/custom_components/ohme/api_client.py @@ -57,9 +57,8 @@ async def async_refresh_session(self): # Don't refresh token unless its over 45 mins old if time() - self._token_birth < 2700: - _LOGGER.warning((time() - self._token_birth)) return - _LOGGER.warning("Starting token refresh.") + async with self._auth_session.post( f"https://securetoken.googleapis.com/v1/token?key={GOOGLE_API_KEY}", data={"grantType": "refresh_token", @@ -75,7 +74,6 @@ async def async_refresh_session(self): self._token_birth = time() self._token = resp_json['id_token'] self._refresh_token = resp_json['refresh_token'] - _LOGGER.warning("Very nice, great success.") return True