Fix memory leak on apple_tv reload (#49454)
This commit is contained in:
parent
baa8de2f89
commit
3cbfa36397
1 changed files with 3 additions and 1 deletions
|
@ -50,7 +50,9 @@ async def async_setup_entry(hass, entry):
|
|||
"""Stop push updates when hass stops."""
|
||||
await manager.disconnect()
|
||||
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, on_hass_stop)
|
||||
entry.async_on_unload(
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, on_hass_stop)
|
||||
)
|
||||
|
||||
async def setup_platforms():
|
||||
"""Set up platforms and initiate connection."""
|
||||
|
|
Loading…
Add table
Reference in a new issue