Use SensorDeviceClass.VOLUME in components (#79253)
This commit is contained in:
parent
0e764b57c2
commit
fab3ee90b2
8 changed files with 23 additions and 2 deletions
|
@ -103,6 +103,7 @@ SENSOR_TYPES = (
|
|||
name="Reservoir content",
|
||||
icon="mdi:car-coolant-level",
|
||||
native_unit_of_measurement=VOLUME_LITERS,
|
||||
device_class=SensorDeviceClass.VOLUME,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda coordinator: coordinator.data.reservoir_content,
|
||||
|
@ -112,6 +113,7 @@ SENSOR_TYPES = (
|
|||
name="Total saved",
|
||||
icon="mdi:water-opacity",
|
||||
native_unit_of_measurement=VOLUME_LITERS,
|
||||
device_class=SensorDeviceClass.VOLUME,
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda coordinator: coordinator.data.total_saved,
|
||||
|
@ -121,6 +123,7 @@ SENSOR_TYPES = (
|
|||
name="Total replenished",
|
||||
icon="mdi:water",
|
||||
native_unit_of_measurement=VOLUME_LITERS,
|
||||
device_class=SensorDeviceClass.VOLUME,
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda coordinator: coordinator.data.total_replenished,
|
||||
|
@ -138,6 +141,7 @@ SENSOR_TYPES = (
|
|||
name="Total use",
|
||||
icon="mdi:chart-donut",
|
||||
native_unit_of_measurement=VOLUME_LITERS,
|
||||
device_class=SensorDeviceClass.VOLUME,
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda coordinator: coordinator.data.totver,
|
||||
|
@ -147,6 +151,7 @@ SENSOR_TYPES = (
|
|||
name="Max reservoir content",
|
||||
icon="mdi:waves",
|
||||
native_unit_of_measurement=VOLUME_LITERS,
|
||||
device_class=SensorDeviceClass.VOLUME,
|
||||
state_class=SensorStateClass.TOTAL,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
value_fn=lambda coordinator: coordinator.data.reservoir_content_max,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue