Mark battery, humidity and pressure sensors as STATE_CLASS_MEASUREMENT (#50924)
* Mark battery, humidity and pressure sensors as STATE_CLASS_MEASUREMENT * Fix deconz battery sensor
This commit is contained in:
parent
ec4a47d1db
commit
b169a8dbda
7 changed files with 44 additions and 8 deletions
|
@ -93,6 +93,7 @@ class HueBattery(GenericHueSensor, SensorEntity):
|
|||
"""Battery class for when a batt-powered device is only represented as an event."""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_BATTERY
|
||||
_attr_state_class = STATE_CLASS_MEASUREMENT
|
||||
_attr_unit_of_measurement = PERCENTAGE
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue