Don't parse previous messages when UniFi connection state change to available (#45544)

* Don't parse previous messages when connection state change to available

* Disable pylint for arguments-differ W0221 message
This commit is contained in:
Robert Svensson 2021-01-26 16:41:28 +01:00 committed by GitHub
parent baab9b9a81
commit 26764a805b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 13 deletions

View file

@ -376,6 +376,12 @@ async def test_controller_state_change(hass):
)
assert len(hass.states.async_entity_ids(TRACKER_DOMAIN)) == 2
client_1 = hass.states.get("device_tracker.client_1")
assert client_1.state == "not_home"
device_1 = hass.states.get("device_tracker.device_1")
assert device_1.state == "home"
# Controller unavailable
controller.async_unifi_signalling_callback(
SIGNAL_CONNECTION_STATE, STATE_DISCONNECTED
@ -393,7 +399,7 @@ async def test_controller_state_change(hass):
await hass.async_block_till_done()
client_1 = hass.states.get("device_tracker.client_1")
assert client_1.state == "home"
assert client_1.state == "not_home"
device_1 = hass.states.get("device_tracker.device_1")
assert device_1.state == "home"