Skip to content

Commit

Permalink
fix: add reconnect_watchdog in unload
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneNulschDE committed Dec 14, 2024
1 parent a7a5a38 commit ea2d784
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/mbapi2020/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ea2d784

Please # to comment.