Replace Tibber STATE_CLASS_TOTAL_INCREASING with STATE_CLASS_TOTAL for not strictly increasing sensors (#60501)

* Tibber, fix #60490 not strictly increasing

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Tibber, fix #60490 not strictly increasing

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Tibber, fix #60490 not strictly increasing

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>
This commit is contained in:
Daniel Hjelseth Høyer 2021-11-29 08:22:48 +01:00 committed by GitHub
parent c535f785a8
commit 70b8decfb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,7 @@ from homeassistant.components.sensor import (
DEVICE_CLASS_SIGNAL_STRENGTH,
DEVICE_CLASS_VOLTAGE,
STATE_CLASS_MEASUREMENT,
STATE_CLASS_TOTAL,
STATE_CLASS_TOTAL_INCREASING,
SensorEntity,
SensorEntityDescription,
@ -87,7 +88,7 @@ RT_SENSORS: tuple[SensorEntityDescription, ...] = (
name="accumulated consumption",
device_class=DEVICE_CLASS_ENERGY,
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
state_class=STATE_CLASS_TOTAL_INCREASING,
state_class=STATE_CLASS_TOTAL,
),
SensorEntityDescription(
key="accumulatedConsumptionLastHour",
@ -101,7 +102,7 @@ RT_SENSORS: tuple[SensorEntityDescription, ...] = (
name="accumulated production",
device_class=DEVICE_CLASS_ENERGY,
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
state_class=STATE_CLASS_TOTAL_INCREASING,
state_class=STATE_CLASS_TOTAL,
),
SensorEntityDescription(
key="accumulatedProductionLastHour",