diff --git a/custom_components/polestar_api/pypolestar/auth.py b/custom_components/polestar_api/pypolestar/auth.py index d3802c7..ed90f5e 100644 --- a/custom_components/polestar_api/pypolestar/auth.py +++ b/custom_components/polestar_api/pypolestar/auth.py @@ -101,7 +101,7 @@ def is_token_valid(self) -> bool: and self.token_expiry > datetime.now(tz=timezone.utc) ) - async def get_token(self, refresh: bool = True, force: bool = False) -> None: + async def get_token(self, force: bool = False) -> None: """Ensure we have a valid access token (still valid, refreshed or initial).""" if ( @@ -113,7 +113,7 @@ async def get_token(self, refresh: bool = True, force: bool = False) -> None: self.logger.debug("Token still valid until %s", self.token_expiry) return - if refresh and self.refresh_token: + if self.refresh_token: try: await self._token_refresh() self.logger.debug("Token refreshed")