Fix Tibber sensors state class (#117085)

* set correct state classes

* revert bool to pass mypy locally
This commit is contained in:
Bas Brussee 2024-05-17 15:10:08 +02:00 committed by GitHub
parent a7ca36e88c
commit 658c1f3d97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -130,7 +130,7 @@ RT_SENSORS: tuple[SensorEntityDescription, ...] = (
translation_key="accumulated_consumption", translation_key="accumulated_consumption",
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL, state_class=SensorStateClass.TOTAL_INCREASING,
), ),
SensorEntityDescription( SensorEntityDescription(
key="accumulatedConsumptionLastHour", key="accumulatedConsumptionLastHour",
@ -150,7 +150,7 @@ RT_SENSORS: tuple[SensorEntityDescription, ...] = (
translation_key="accumulated_production", translation_key="accumulated_production",
device_class=SensorDeviceClass.ENERGY, device_class=SensorDeviceClass.ENERGY,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL, state_class=SensorStateClass.TOTAL_INCREASING,
), ),
SensorEntityDescription( SensorEntityDescription(
key="accumulatedProductionLastHour", key="accumulatedProductionLastHour",