From ea2d7845ecedc910ca4c96ca64581c7e5942531b Mon Sep 17 00:00:00 2001 From: Rene Nulsch Date: Sat, 14 Dec 2024 22:55:48 +0100 Subject: [PATCH] fix: add reconnect_watchdog in unload --- custom_components/mbapi2020/__init__.py | 1 + 1 file changed, 1 insertion(+) 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):