Fix memory leak in unifi on reload (#49456)
parent
052e935c2b
commit
7db5d50ce4
homeassistant/components/unifi
|
@ -44,7 +44,9 @@ async def async_setup_entry(hass, config_entry):
|
|||
|
||||
hass.data[UNIFI_DOMAIN][config_entry.entry_id] = controller
|
||||
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, controller.shutdown)
|
||||
config_entry.async_on_unload(
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, controller.shutdown)
|
||||
)
|
||||
|
||||
LOGGER.debug("UniFi config options %s", config_entry.options)
|
||||
|
||||
|
|
Loading…
Reference in New Issue