deCONZ - Add support for new switch type (#31362)

This commit is contained in:
Robert Svensson authored and Paulus Schoutsen committed 2020-02-02 15:39:33 -08:00
1 parent 11fcb2cc7f
commit 59a9ca71ce
4 files changed
+35 -8

No files matched your search

+12 -1
View File
@@ -38,6 +38,13 @@ SWITCHES = {
"state": {"reachable": True},
"uniqueid": "00:00:00:00:00:00:00:03-00",
},
"5": {
"id": "On off relay id",
"name": "On off relay",
"state": {"on": True, "reachable": True},
"type": "On/Off light",
"uniqueid": "00:00:00:00:00:00:00:04-00",
},
}
@@ -68,7 +75,8 @@ async def test_switches(hass):
assert "switch.smart_plug" in gateway.deconz_ids
assert "switch.warning_device" in gateway.deconz_ids
assert "switch.unsupported_switch" not in gateway.deconz_ids
assert len(hass.states.async_all()) == 4
assert "switch.on_off_relay" in gateway.deconz_ids
assert len(hass.states.async_all()) == 5
on_off_switch = hass.states.get("switch.on_off_switch")
assert on_off_switch.state == "on"
@@ -79,6 +87,9 @@ async def test_switches(hass):
warning_device = hass.states.get("switch.warning_device")
assert warning_device.state == "on"
on_off_relay = hass.states.get("switch.on_off_relay")
assert on_off_relay.state == "on"
state_changed_event = {
"t": "event",
"e": "changed",