Skip to content

Commit bcea566

Browse files
authored
Merge pull request #52 from CoMPaTech/devclass
Appropriate device class for sensors (energy)
2 parents c350dd0 + 3e8db85 commit bcea566

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ Even though available does not mean it's stable yet, the HA part is solid but th
120120

121121
# Changelog
122122

123+
## NOV 2023 [0.2.7]
124+
- Fix to appropriate `device_class` from 0.2.5
125+
123126
## NOV 2023 [0.2.6]
124127
- Fix API recall (reverted maintenance approach from 0.2.5) tnx to @simonwolf83
125128

custom_components/stromer/sensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
key="average_energy_consumption",
3535
name="Energy used (average)",
3636
native_unit_of_measurement=ENERGY_WATT_HOUR,
37-
device_class=SensorDeviceClass.POWER,
37+
device_class=SensorDeviceClass.ENERGY,
3838
state_class=SensorStateClass.MEASUREMENT,
3939
),
4040
SensorEntityDescription(
@@ -111,7 +111,7 @@
111111
key="total_energy_consumption",
112112
name="Energy used (total)",
113113
native_unit_of_measurement=ENERGY_WATT_HOUR,
114-
device_class=SensorDeviceClass.POWER,
114+
device_class=SensorDeviceClass.ENERGY,
115115
state_class=SensorStateClass.MEASUREMENT,
116116
),
117117
SensorEntityDescription(

0 commit comments

Comments
 (0)