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
|
@ -705,7 +705,7 @@ class NetatmoPublicSensor(NetatmoBase, SensorEntity):
|
|||
await super().async_added_to_hass()
|
||||
|
||||
assert self.device_info and "name" in self.device_info
|
||||
self.data_handler.listeners.append(
|
||||
self.data_handler.config_entry.async_on_unload(
|
||||
async_dispatcher_connect(
|
||||
self.hass,
|
||||
f"netatmo-config-{self.device_info['name']}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue