diff --git a/homeassistant/components/netgear_lte/__init__.py b/homeassistant/components/netgear_lte/__init__.py index a227fa5fe3ec..a2c6338f21cf 100644 --- a/homeassistant/components/netgear_lte/__init__.py +++ b/homeassistant/components/netgear_lte/__init__.py @@ -51,7 +51,6 @@ ALL_BINARY_SENSORS = [ PLATFORMS = [ Platform.BINARY_SENSOR, - Platform.NOTIFY, Platform.SENSOR, ] @@ -101,13 +100,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: NetgearLTEConfigEntry) - hass, Platform.NOTIFY, DOMAIN, - {CONF_NAME: entry.title, "modem": modem}, + {CONF_NAME: entry.title, "modem": modem, "entry": entry}, hass.data[DATA_HASS_CONFIG], ) - await hass.config_entries.async_forward_entry_setups( - entry, [platform for platform in PLATFORMS if platform != Platform.NOTIFY] - ) + await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) return True diff --git a/homeassistant/components/netgear_lte/notify.py b/homeassistant/components/netgear_lte/notify.py index 763581b9cada..5b10398e0556 100644 --- a/homeassistant/components/netgear_lte/notify.py +++ b/homeassistant/components/netgear_lte/notify.py @@ -38,6 +38,7 @@ class NetgearNotifyService(BaseNotificationService): """Initialize the service.""" self.config = config self.modem: Modem = discovery_info["modem"] + discovery_info["entry"].async_on_unload(self.async_unregister_services) async def async_send_message(self, message="", **kwargs): """Send a message to a user."""