diff --git a/homeassistant/components/deconz/binary_sensor.py b/homeassistant/components/deconz/binary_sensor.py index 225a28f52f8..667eb6db075 100644 --- a/homeassistant/components/deconz/binary_sensor.py +++ b/homeassistant/components/deconz/binary_sensor.py @@ -89,8 +89,10 @@ class DeconzBinarySensor(DeconzDevice, BinarySensorDevice): if self._device.secondary_temperature is not None: attr[ATTR_TEMPERATURE] = self._device.secondary_temperature - if self._device.type in Presence.ZHATYPE and self._device.dark is not None: - attr[ATTR_DARK] = self._device.dark + if self._device.type in Presence.ZHATYPE: + + if self._device.dark is not None: + attr[ATTR_DARK] = self._device.dark elif self._device.type in Vibration.ZHATYPE: attr[ATTR_ORIENTATION] = self._device.orientation diff --git a/homeassistant/components/deconz/manifest.json b/homeassistant/components/deconz/manifest.json index f448e9105c8..adac6f54493 100644 --- a/homeassistant/components/deconz/manifest.json +++ b/homeassistant/components/deconz/manifest.json @@ -4,7 +4,7 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/deconz", "requirements": [ - "pydeconz==68" + "pydeconz==69" ], "ssdp": [ { diff --git a/homeassistant/components/deconz/sensor.py b/homeassistant/components/deconz/sensor.py index 8261f03e902..81804dfb9f6 100644 --- a/homeassistant/components/deconz/sensor.py +++ b/homeassistant/components/deconz/sensor.py @@ -143,8 +143,13 @@ class DeconzSensor(DeconzDevice): elif self._device.type in Daylight.ZHATYPE: attr[ATTR_DAYLIGHT] = self._device.daylight - elif self._device.type in LightLevel.ZHATYPE and self._device.dark is not None: - attr[ATTR_DARK] = self._device.dark + elif self._device.type in LightLevel.ZHATYPE: + + if self._device.dark is not None: + attr[ATTR_DARK] = self._device.dark + + if self._device.daylight is not None: + attr[ATTR_DAYLIGHT] = self._device.daylight elif self._device.type in Power.ZHATYPE: attr[ATTR_CURRENT] = self._device.current diff --git a/requirements_all.txt b/requirements_all.txt index 5099c2c6975..0676aab88b6 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1191,7 +1191,7 @@ pydaikin==1.6.2 pydanfossair==0.1.0 # homeassistant.components.deconz -pydeconz==68 +pydeconz==69 # homeassistant.components.delijn pydelijn==0.5.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 18886493f0d..7d951641c8e 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -420,7 +420,7 @@ pycoolmasternet==0.0.4 pydaikin==1.6.2 # homeassistant.components.deconz -pydeconz==68 +pydeconz==69 # homeassistant.components.zwave pydispatcher==2.0.5