Add support for deCONZ daylight sensor (#13479)
* Add support for deCONZ daylight sensor Bump pydeconz to 34 * Remove 'daylight' reason from async upull/13850/merge
parent
3906250c9e
commit
d3b261a25d
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue