deCONZ - New light level sensor attribute (#31255)

This commit is contained in:
Robert Svensson 2020-01-29 07:40:42 +01:00 committed by GitHub
parent 37af2170ec
commit 36675fe4fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 7 deletions

View file

@ -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

View file

@ -4,7 +4,7 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/deconz",
"requirements": [
"pydeconz==68"
"pydeconz==69"
],
"ssdp": [
{

View file

@ -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

View file

@ -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

View file

@ -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