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

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