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:
parent
1febb32dd9
commit
6565c17828
10 changed files with 401 additions and 583 deletions
|
@ -77,12 +77,13 @@ async def async_setup_entry(hass, config_entry):
|
|||
hass.data[DOMAIN] = {}
|
||||
|
||||
controller = UniFiController(hass, config_entry)
|
||||
controller_id = get_controller_id_from_config_entry(config_entry)
|
||||
hass.data[DOMAIN][controller_id] = controller
|
||||
|
||||
if not await controller.async_setup():
|
||||
return False
|
||||
|
||||
controller_id = get_controller_id_from_config_entry(config_entry)
|
||||
hass.data[DOMAIN][controller_id] = controller
|
||||
|
||||
if controller.mac is None:
|
||||
return True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue