UniFi - Move some preloading of unavailable clients earlier in setup phase (#34599)

Improve readability of setting up switch platform
This commit is contained in:
Robert Svensson authored and GitHub committed 2020-04-23 21:29:38 +02:00
1 parent a7e8446454
commit b578a76efa
4 files changed
+48 -54

No files matched your search

+2 -2
View File
@@ -383,7 +383,7 @@ async def test_option_block_clients(hass):
options={CONF_BLOCK_CLIENT: [BLOCKED["mac"], UNBLOCKED["mac"]]},
)
await hass.async_block_till_done()
assert len(hass.states.async_entity_ids(SWITCH_DOMAIN)) == 2
assert len(hass.states.async_entity_ids(SWITCH_DOMAIN)) == 1
# Remove the second switch again
hass.config_entries.async_update_entry(
@@ -397,7 +397,7 @@ async def test_option_block_clients(hass):
controller.config_entry, options={CONF_BLOCK_CLIENT: [UNBLOCKED["mac"]]},
)
await hass.async_block_till_done()
assert len(hass.states.async_entity_ids(SWITCH_DOMAIN)) == 1
assert len(hass.states.async_entity_ids(SWITCH_DOMAIN)) == 0
# Remove one
hass.config_entries.async_update_entry(