diff --git a/custom_components/mbapi2020/__init__.py b/custom_components/mbapi2020/__init__.py index b0e795de..282f9d18 100644 --- a/custom_components/mbapi2020/__init__.py +++ b/custom_components/mbapi2020/__init__.py @@ -235,6 +235,7 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry): unload_ok = False if len(hass.data[DOMAIN][config_entry.entry_id].client.cars) > 0: + hass.data[DOMAIN][config_entry.entry_id].client.websocket._reconnectwatchdog.cancel() result = await hass.data[DOMAIN][config_entry.entry_id].client.websocket.async_stop() hass.data[DOMAIN][config_entry.entry_id].client.websocket = None if unload_ok := await hass.config_entries.async_unload_platforms(config_entry, MERCEDESME_COMPONENTS):