From ace4edf91c2d7ee4fc5e36e4e703957034745a82 Mon Sep 17 00:00:00 2001 From: Brett Adams Date: Fri, 5 Jan 2024 17:23:43 +1000 Subject: [PATCH] Hotfix cache logic bug in Tessie (#107187) --- homeassistant/components/tessie/coordinator.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/homeassistant/components/tessie/coordinator.py b/homeassistant/components/tessie/coordinator.py index c2f53da53bc3..75cac088bde4 100644 --- a/homeassistant/components/tessie/coordinator.py +++ b/homeassistant/components/tessie/coordinator.py @@ -41,7 +41,6 @@ class TessieStateUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]): self.vin = vin self.session = async_get_clientsession(hass) self.data = self._flatten(data) - self.did_first_update = False async def _async_update_data(self) -> dict[str, Any]: """Update vehicle data using Tessie API.""" @@ -50,7 +49,7 @@ class TessieStateUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]): session=self.session, api_key=self.api_key, vin=self.vin, - use_cache=self.did_first_update, + use_cache=False, ) except ClientResponseError as e: if e.status == HTTPStatus.UNAUTHORIZED: @@ -58,7 +57,6 @@ class TessieStateUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]): raise ConfigEntryAuthFailed from e raise e - self.did_first_update = True if vehicle["state"] == TessieStatus.ONLINE: # Vehicle is online, all data is fresh return self._flatten(vehicle)