mirror of
https://github.com/elisspace/core.git
synced 2026-10-02 23:39:53 +00:00
Handle disabled devices (#25625)
This commit is contained in:
committed by
Paulus Schoutsen
parent
7168dd6cec
commit
56ca0edaa7
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user