Skip to content

Commit

Permalink
Merge pull request #52 from CoMPaTech/devclass
Browse files Browse the repository at this point in the history
Appropriate device class for sensors (energy)
  • Loading branch information
CoMPaTech committed Nov 6, 2023
2 parents c350dd0 + 3e8db85 commit bcea566
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ Even though available does not mean it's stable yet, the HA part is solid but th

# Changelog

## NOV 2023 [0.2.7]
- Fix to appropriate `device_class` from 0.2.5

## NOV 2023 [0.2.6]
- Fix API recall (reverted maintenance approach from 0.2.5) tnx to @simonwolf83

Expand Down
4 changes: 2 additions & 2 deletions custom_components/stromer/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
key="average_energy_consumption",
name="Energy used (average)",
native_unit_of_measurement=ENERGY_WATT_HOUR,
device_class=SensorDeviceClass.POWER,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
Expand Down Expand Up @@ -111,7 +111,7 @@
key="total_energy_consumption",
name="Energy used (total)",
native_unit_of_measurement=ENERGY_WATT_HOUR,
device_class=SensorDeviceClass.POWER,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
Expand Down

0 comments on commit bcea566

Please sign in to comment.