mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
fix state_class for water used today sensor (#147787)
This commit is contained in:
parent
5a3aa7874d
commit
61a29db72c
@ -92,7 +92,7 @@ SENSORS: list[DROPSensorEntityDescription] = [
|
|||||||
native_unit_of_measurement=UnitOfVolume.GALLONS,
|
native_unit_of_measurement=UnitOfVolume.GALLONS,
|
||||||
suggested_display_precision=1,
|
suggested_display_precision=1,
|
||||||
value_fn=lambda device: device.drop_api.water_used_today(),
|
value_fn=lambda device: device.drop_api.water_used_today(),
|
||||||
state_class=SensorStateClass.TOTAL,
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
),
|
),
|
||||||
DROPSensorEntityDescription(
|
DROPSensorEntityDescription(
|
||||||
key=AVERAGE_WATER_USED,
|
key=AVERAGE_WATER_USED,
|
||||||
|
@ -356,7 +356,7 @@
|
|||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
'device_class': 'water',
|
'device_class': 'water',
|
||||||
'friendly_name': 'Hub DROP-1_C0FFEE Total water used today',
|
'friendly_name': 'Hub DROP-1_C0FFEE Total water used today',
|
||||||
'state_class': <SensorStateClass.TOTAL: 'total'>,
|
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||||
'unit_of_measurement': <UnitOfVolume.LITERS: 'L'>,
|
'unit_of_measurement': <UnitOfVolume.LITERS: 'L'>,
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
@ -372,7 +372,7 @@
|
|||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
'device_class': 'water',
|
'device_class': 'water',
|
||||||
'friendly_name': 'Hub DROP-1_C0FFEE Total water used today',
|
'friendly_name': 'Hub DROP-1_C0FFEE Total water used today',
|
||||||
'state_class': <SensorStateClass.TOTAL: 'total'>,
|
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||||
'unit_of_measurement': <UnitOfVolume.LITERS: 'L'>,
|
'unit_of_measurement': <UnitOfVolume.LITERS: 'L'>,
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user