mirror of
https://github.com/home-assistant/core.git
synced 2025-11-10 11:29:46 +00:00
Use config_entry.on_unload rather than local listener implementation in Axis (#49495)
This commit is contained in:
@@ -53,7 +53,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
):
|
||||
async_add_entities([AxisBinarySensor(event, device)])
|
||||
|
||||
device.listeners.append(
|
||||
config_entry.async_on_unload(
|
||||
async_dispatcher_connect(hass, device.signal_new_event, async_add_sensor)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user