From 70b8decfb51cf90bf87d9c77489ce393cb60a1c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hjelseth=20H=C3=B8yer?= Date: Mon, 29 Nov 2021 08:22:48 +0100 Subject: [PATCH] Replace Tibber STATE_CLASS_TOTAL_INCREASING with STATE_CLASS_TOTAL for not strictly increasing sensors (#60501) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Tibber, fix #60490 not strictly increasing Signed-off-by: Daniel Hjelseth Høyer * Tibber, fix #60490 not strictly increasing Signed-off-by: Daniel Hjelseth Høyer * Tibber, fix #60490 not strictly increasing Signed-off-by: Daniel Hjelseth Høyer --- homeassistant/components/tibber/sensor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tibber/sensor.py b/homeassistant/components/tibber/sensor.py index e6a305b6f61..df79f287cf7 100644 --- a/homeassistant/components/tibber/sensor.py +++ b/homeassistant/components/tibber/sensor.py @@ -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",