Add support for ZHA door locks #2 (#24344)

* Add support for DoorLock cluster
* Add test for zha lock
* Change lock_state report to REPORT_CONFIG_IMMEDIATE
* Update channel command wrapper to return the entire result
This allows for return values other than result[1]

* Fix tests
* Fix lint
* Update DoorLock test to work with updated zigpy schema
* Fix lint
* Fix unlock test
This commit is contained in:
presslab-us authored and Alexei Chetroi committed 2019-06-07 11:16:33 -04:00
1 parent 592d30d495
commit cb460a85ba
11 files changed
+305 -34

No files matched your search

+2 -2
View File
@@ -54,7 +54,7 @@ async def test_switch(hass, config_entry, zha_gateway):
# turn on from HA
with patch(
'zigpy.zcl.Cluster.request',
return_value=mock_coro([Status.SUCCESS, Status.SUCCESS])):
return_value=mock_coro([0x00, Status.SUCCESS])):
# turn on via UI
await hass.services.async_call(DOMAIN, 'turn_on', {
'entity_id': entity_id
@@ -66,7 +66,7 @@ async def test_switch(hass, config_entry, zha_gateway):
# turn off from HA
with patch(
'zigpy.zcl.Cluster.request',
return_value=mock_coro([Status.SUCCESS, Status.SUCCESS])):
return_value=mock_coro([0x01, Status.SUCCESS])):
# turn off via UI
await hass.services.async_call(DOMAIN, 'turn_off', {
'entity_id': entity_id