Handle wired bug on restart (#30276)

This commit is contained in:
Robert Svensson 2019-12-30 19:40:52 +01:00 committed by Andrew Sayre
parent bad35577cb
commit 41d2d1f309
3 changed files with 28 additions and 2 deletions

View file

@ -59,6 +59,7 @@ async def setup_unifi_integration(
clients_response,
devices_response,
clients_all_response,
known_wireless_clients=None,
):
"""Create the UniFi controller."""
if UNIFI_CONFIG not in hass.data:
@ -76,6 +77,11 @@ async def setup_unifi_integration(
entry_id=1,
)
if known_wireless_clients:
hass.data[UNIFI_WIRELESS_CLIENTS].update_data(
known_wireless_clients, config_entry
)
mock_client_responses = deque()
mock_client_responses.append(clients_response)