mirror of
https://github.com/home-assistant/core.git
synced 2025-05-20 13:59:15 +00:00
Fix memory leak in netatmo (#49464)
This commit is contained in:
parent
12853438c5
commit
b557d20fbb
@ -188,7 +188,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
||||
except pyatmo.ApiError as err:
|
||||
_LOGGER.error("Error during webhook registration - %s", err)
|
||||
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, unregister_webhook)
|
||||
entry.async_on_unload(
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, unregister_webhook)
|
||||
)
|
||||
|
||||
if hass.state == CoreState.running:
|
||||
await register_webhook(None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user