Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #39 from northalpha/fix/ha-energy-dashboard-sensors
Browse files Browse the repository at this point in the history
Change some SensorStateClass from MEASUREMENT to TOTAL_INCREASING
  • Loading branch information
a529987659852 authored Nov 6, 2022
2 parents 763a0cf + 34bb723 commit 1d72afd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/openwbmqtt/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ class openWBNumberEntityDescription(NumberEntityDescription):
key="evu/DailyYieldExportKwh",
name="Heutiger Strom-Export (kWh)",
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
value_fn=lambda x: round(float(x), 2),
icon="mdi:transmission-tower-export",
Expand All @@ -305,8 +305,8 @@ class openWBNumberEntityDescription(NumberEntityDescription):
key="evu/DailyYieldImportKwh",
name="Heutiger Strom-Bezug (kWh)",
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
value_fn=lambda x: round(float(x), 2),
icon="mdi:transmission-tower-export",
Expand Down Expand Up @@ -346,8 +346,8 @@ class openWBNumberEntityDescription(NumberEntityDescription):
key="housebattery/DailyYieldExportKwh",
name="Batterieentladung Heute (kWh)",
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
value_fn=lambda x: round(float(x), 2),
icon="mdi:battery-arrow-up-outline",
Expand All @@ -356,8 +356,8 @@ class openWBNumberEntityDescription(NumberEntityDescription):
key="housebattery/DailyYieldImportKwh",
name="Batterieladung Heute (kWh)",
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
value_fn=lambda x: round(float(x), 2),
icon="mdi:battery-arrow-down-outline",
Expand Down

0 comments on commit 1d72afd

Please sign in to comment.