deCONZ - new sensor attribute 'on' and new sensor GenericFlag#15247
Conversation
| if self._sensor.battery: | ||
| attr[ATTR_BATTERY_LEVEL] = self._sensor.battery | ||
| if self._sensor.on is not None: | ||
| attr[ATTR_ON] = self._sensor.on |
There was a problem hiding this comment.
How is is_on different from is_tripped and reachable ? Shouldn't on just impact the available property?
There was a problem hiding this comment.
I was contemplating whether or not. But I decided to go with this way. The on is if the device should report status or not. This is something controlled by the user who can still decide to change 'on' from false to true, so I don't think that reachable is applicable here since in that context you wouldn't expect you could change the 'on' value.
There was a problem hiding this comment.
Would it be preferable if I called it enabled or keep with how zigbee names it?
There was a problem hiding this comment.
Yes, we should try to stick to how the source names things.
|
Thanks @balloob ! |
…ssistant#15247) * New sensor attribute 'on' * New sensor GenericFlag
…ssistant#15247) * New sensor attribute 'on' * New sensor GenericFlag
Description:
New attribute 'on' for sensors
New sensor GenericFlag added through updated dependency
Checklist:
tox. Your PR cannot be merged unless tests pass