From 658c1f3d97a8a8eb0d91150e09b36c995a4863c5 Mon Sep 17 00:00:00 2001 From: Bas Brussee <68892092+basbruss@users.noreply.github.com> Date: Fri, 17 May 2024 15:10:08 +0200 Subject: [PATCH] Fix Tibber sensors state class (#117085) * set correct state classes * revert bool to pass mypy locally --- homeassistant/components/tibber/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tibber/sensor.py b/homeassistant/components/tibber/sensor.py index 7da0a2b7947..0760b5309a3 100644 --- a/homeassistant/components/tibber/sensor.py +++ b/homeassistant/components/tibber/sensor.py @@ -130,7 +130,7 @@ RT_SENSORS: tuple[SensorEntityDescription, ...] = ( translation_key="accumulated_consumption", device_class=SensorDeviceClass.ENERGY, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, - state_class=SensorStateClass.TOTAL, + state_class=SensorStateClass.TOTAL_INCREASING, ), SensorEntityDescription( key="accumulatedConsumptionLastHour", @@ -150,7 +150,7 @@ RT_SENSORS: tuple[SensorEntityDescription, ...] = ( translation_key="accumulated_production", device_class=SensorDeviceClass.ENERGY, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, - state_class=SensorStateClass.TOTAL, + state_class=SensorStateClass.TOTAL_INCREASING, ), SensorEntityDescription( key="accumulatedProductionLastHour",