From b87c541d3ac97d1c9ae38e292c6133ec6a077b3c Mon Sep 17 00:00:00 2001 From: Jurriaan Pruis Date: Tue, 11 Jun 2019 20:28:37 +0000 Subject: [PATCH] Support ZLO device types to support newer Zigbee devices in ZHA (#24429) * Support ZLO device types Support the device types that are added in https://github.com/zigpy/zigpy/pull/176 so newer Zigbee devices can be supported. * Remove BINARY_SENSOR mappings * Add back ON_OFF_LIGHT_SWITCH, DIMMER_SWITCH and COLOR_DIMMABLE_LIGHT Since they are target devices I've added them as switch and lights, which matches the Zigbee documentation. * Upgrade to zigpy-homeassistant v0.5.0 To be able to use the new DeviceTypes --- homeassistant/components/zha/core/registries.py | 11 ++++++++++- homeassistant/components/zha/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/zha/core/registries.py b/homeassistant/components/zha/core/registries.py index 00c2dd22740..8db60727578 100644 --- a/homeassistant/components/zha/core/registries.py +++ b/homeassistant/components/zha/core/registries.py @@ -115,7 +115,16 @@ def establish_device_mappings(): zha.DeviceType.LEVEL_CONTROLLABLE_OUTPUT: LIGHT, zha.DeviceType.ON_OFF_LIGHT: LIGHT, zha.DeviceType.DIMMABLE_LIGHT: LIGHT, - zha.DeviceType.COLOR_DIMMABLE_LIGHT: LIGHT + zha.DeviceType.COLOR_DIMMABLE_LIGHT: LIGHT, + zha.DeviceType.ON_OFF_LIGHT_SWITCH: SWITCH, + zha.DeviceType.DIMMER_SWITCH: LIGHT, + zha.DeviceType.COLOR_DIMMER_SWITCH: LIGHT, + zha.DeviceType.ON_OFF_BALLAST: SWITCH, + zha.DeviceType.DIMMABLE_BALLAST: LIGHT, + zha.DeviceType.ON_OFF_PLUG_IN_UNIT: SWITCH, + zha.DeviceType.DIMMABLE_PLUG_IN_UNIT: LIGHT, + zha.DeviceType.COLOR_TEMPERATURE_LIGHT: LIGHT, + zha.DeviceType.EXTENDED_COLOR_LIGHT: LIGHT }) DEVICE_CLASS[zll.PROFILE_ID].update({ diff --git a/homeassistant/components/zha/manifest.json b/homeassistant/components/zha/manifest.json index d9f17d3f41c..4e327381902 100644 --- a/homeassistant/components/zha/manifest.json +++ b/homeassistant/components/zha/manifest.json @@ -7,7 +7,7 @@ "bellows-homeassistant==0.8.0", "zha-quirks==0.0.14", "zigpy-deconz==0.1.4", - "zigpy-homeassistant==0.4.2", + "zigpy-homeassistant==0.5.0", "zigpy-xbee-homeassistant==0.3.0" ], "dependencies": [], diff --git a/requirements_all.txt b/requirements_all.txt index 8607dbef478..565269be9c4 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1914,7 +1914,7 @@ ziggo-mediabox-xl==1.1.0 zigpy-deconz==0.1.4 # homeassistant.components.zha -zigpy-homeassistant==0.4.2 +zigpy-homeassistant==0.5.0 # homeassistant.components.zha zigpy-xbee-homeassistant==0.3.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index d45f6cd70fe..5f333e4026a 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -364,4 +364,4 @@ wakeonlan==1.1.6 zeroconf==0.23.0 # homeassistant.components.zha -zigpy-homeassistant==0.4.2 +zigpy-homeassistant==0.5.0