Add support for deCONZ daylight sensor (#13479)

* Add support for deCONZ daylight sensor

Bump pydeconz to 34

* Remove 'daylight' reason from async u
pull/13850/merge
Mark Coombes 2018-04-13 02:58:57 -04:00 committed by Martin Hjelmare
parent 3906250c9e
commit d3b261a25d
1 changed files with 3 additions and 0 deletions

View File

@ -16,6 +16,7 @@ from homeassistant.util import slugify
DEPENDENCIES = ['deconz']
ATTR_CURRENT = 'current'
ATTR_DAYLIGHT = 'daylight'
ATTR_EVENT_ID = 'event_id'
@ -113,6 +114,8 @@ class DeconzSensor(Entity):
if self.unit_of_measurement == 'Watts':
attr[ATTR_CURRENT] = self._sensor.current
attr[ATTR_VOLTAGE] = self._sensor.voltage
if self._sensor.sensor_class == 'daylight':
attr[ATTR_DAYLIGHT] = self._sensor.daylight
return attr