mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 12:30:31 +00:00
UniFi - Improve controller tests (#27261)
* Improve controller tests and harmonize setup_unifi_integration to one * Store listeners to dispatchers to be used during reset
This commit is contained in:
@@ -53,7 +53,9 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Update the values of the controller."""
|
||||
update_items(controller, async_add_entities, switches, switches_off)
|
||||
|
||||
async_dispatcher_connect(hass, controller.signal_update, update_controller)
|
||||
controller.listeners.append(
|
||||
async_dispatcher_connect(hass, controller.signal_update, update_controller)
|
||||
)
|
||||
|
||||
update_controller()
|
||||
switches_off.clear()
|
||||
|
||||
Reference in New Issue
Block a user