Add state_class to ring battery sensor for LTS (#109872)
* Add state_class to ring battery sensor for LTS * Add test, in test_sensor.py, for state_class for battery entity; in response to comment in PR
This commit is contained in:
parent
d49bccf123
commit
c4247205ed
2 changed files with 10 additions and 0 deletions
|
@ -10,6 +10,7 @@ from homeassistant.components.sensor import (
|
|||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
|
@ -162,6 +163,7 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = (
|
|||
category=["doorbots", "authorized_doorbots", "stickup_cams"],
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
device_class=SensorDeviceClass.BATTERY,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
cls=RingSensor,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue