deCONZ - Add support for "Window covering controller" (#35294)

* Add support for "Window covering controller" 

Some window cover devices such as Sunricher SR-ZG9080A are identified in deconz as "Window covering controller".
We need to include this device type in const.py to be integrated as type "cover" in home-assistant.

* Added Window covering controller to deconz tests
pull/35729/head
Carlos Giraldo 2020-05-17 09:57:24 +02:00 committed by GitHub
parent e94f44f294
commit d02bb70f0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -37,7 +37,7 @@ ATTR_ON = "on"
ATTR_VALVE = "valve"
DAMPERS = ["Level controllable output"]
WINDOW_COVERS = ["Window covering device"]
WINDOW_COVERS = ["Window covering device", "Window covering controller"]
COVER_TYPES = DAMPERS + WINDOW_COVERS
POWER_PLUGS = ["On/Off light", "On/Off plug-in unit", "Smart plug"]

View File

@ -41,6 +41,14 @@ COVERS = {
"modelid": "Not zigbee spec",
"uniqueid": "00:00:00:00:00:00:00:03-00",
},
"5": {
"id": "Window covering controller id",
"name": "Window covering controller",
"type": "Window covering controller",
"state": {"bri": 254, "on": True, "reachable": True},
"modelid": "Motor controller",
"uniqueid": "00:00:00:00:00:00:00:04-00",
},
}
@ -71,7 +79,8 @@ async def test_cover(hass):
assert "cover.window_covering_device" in gateway.deconz_ids
assert "cover.unsupported_cover" not in gateway.deconz_ids
assert "cover.deconz_old_brightness_cover" in gateway.deconz_ids
assert len(hass.states.async_all()) == 4
assert "cover.window_covering_controller" in gateway.deconz_ids
assert len(hass.states.async_all()) == 5
level_controllable_cover = hass.states.get("cover.level_controllable_cover")
assert level_controllable_cover.state == "open"