diff --git a/homeassistant/components/fritzbox/__init__.py b/homeassistant/components/fritzbox/__init__.py index ff417b25daf..2d9812b9ff9 100644 --- a/homeassistant/components/fritzbox/__init__.py +++ b/homeassistant/components/fritzbox/__init__.py @@ -96,7 +96,9 @@ async def async_setup_entry(hass, entry): """Close connections to this fritzbox.""" fritz.logout() - hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, logout_fritzbox) + entry.async_on_unload( + hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, logout_fritzbox) + ) return True