Handle disabled devices (#25625)

This commit is contained in:
Robert Svensson authored and Paulus Schoutsen committed 2019-08-01 13:35:09 -07:00
1 parent 7168dd6cec
commit 56ca0edaa7
5 files changed
+14 -4

No files matched your search

@@ -203,6 +203,16 @@ async def test_tracked_devices(hass, mock_controller):
device_1 = hass.states.get("device_tracker.device_1")
assert device_1.state == "home"
device_1_copy = copy(DEVICE_1)
device_1_copy["disabled"] = True
mock_controller.mock_client_responses.append({})
mock_controller.mock_device_responses.append([device_1_copy])
await mock_controller.async_update()
await hass.async_block_till_done()
device_1 = hass.states.get("device_tracker.device_1")
assert device_1.state == "unavailable"
async def test_restoring_client(hass, mock_controller):
"""Test the update_items function with some clients."""