mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Refine sensor descriptions for APCUPSD (#114137)
* Refine sensor descriptions for APCUPSD * Add device class for cumonbatt * Add UoM to STESTI and TIMELEFT * Remove device class for STESTI
This commit is contained in:
parent
92ed20ffbf
commit
81ee5fb46b
@ -87,7 +87,9 @@ SENSORS: dict[str, SensorEntityDescription] = {
|
|||||||
"cumonbatt": SensorEntityDescription(
|
"cumonbatt": SensorEntityDescription(
|
||||||
key="cumonbatt",
|
key="cumonbatt",
|
||||||
translation_key="total_time_on_battery",
|
translation_key="total_time_on_battery",
|
||||||
|
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
|
device_class=SensorDeviceClass.DURATION,
|
||||||
),
|
),
|
||||||
"date": SensorEntityDescription(
|
"date": SensorEntityDescription(
|
||||||
key="date",
|
key="date",
|
||||||
@ -340,12 +342,16 @@ SENSORS: dict[str, SensorEntityDescription] = {
|
|||||||
"timeleft": SensorEntityDescription(
|
"timeleft": SensorEntityDescription(
|
||||||
key="timeleft",
|
key="timeleft",
|
||||||
translation_key="time_left",
|
translation_key="time_left",
|
||||||
|
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
device_class=SensorDeviceClass.DURATION,
|
||||||
),
|
),
|
||||||
"tonbatt": SensorEntityDescription(
|
"tonbatt": SensorEntityDescription(
|
||||||
key="tonbatt",
|
key="tonbatt",
|
||||||
translation_key="time_on_battery",
|
translation_key="time_on_battery",
|
||||||
|
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
|
device_class=SensorDeviceClass.DURATION,
|
||||||
),
|
),
|
||||||
"upsmode": SensorEntityDescription(
|
"upsmode": SensorEntityDescription(
|
||||||
key="upsmode",
|
key="upsmode",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user