Use async_on_unload in Netatmo (#58461)
This commit is contained in:
parent
e9ba5f3b4b
commit
ac4496b985
8 changed files with 11 additions and 22 deletions
|
@ -152,7 +152,7 @@ class NetatmoCamera(NetatmoBase, Camera):
|
|||
await super().async_added_to_hass()
|
||||
|
||||
for event_type in (EVENT_TYPE_LIGHT_MODE, EVENT_TYPE_OFF, EVENT_TYPE_ON):
|
||||
self._listeners.append(
|
||||
self.data_handler.config_entry.async_on_unload(
|
||||
async_dispatcher_connect(
|
||||
self.hass,
|
||||
f"signal-{DOMAIN}-webhook-{event_type}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue