Skip to content

Commit

Permalink
Total -> Total Increasing (#145)
Browse files Browse the repository at this point in the history
Fixes issue with getting negative sums in energy view due to wrong total classification
  • Loading branch information
tleegaard authored Nov 24, 2024
1 parent 932c961 commit 5c12b2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/zaptec/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class ZapSensorEntityDescription(SensorEntityDescription):
device_class=SensorDeviceClass.ENERGY,
icon="mdi:counter",
native_unit_of_measurement=const.UnitOfEnergy.KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL,
state_class=SensorStateClass.TOTAL_INCREASING,
),
ZapSensorEntityDescription(
key="signed_meter_value_kwh",
Expand All @@ -232,7 +232,7 @@ class ZapSensorEntityDescription(SensorEntityDescription):
device_class=SensorDeviceClass.ENERGY,
icon="mdi:counter",
native_unit_of_measurement=const.UnitOfEnergy.KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL,
state_class=SensorStateClass.TOTAL_INCREASING,
),
ZapSensorEntityDescription(
key="humidity",
Expand Down

0 comments on commit 5c12b2b

Please sign in to comment.