Skip to content

Commit

Permalink
Update energy sensor state_class to total_inceasing
Browse files Browse the repository at this point in the history
There was a energy sensor with a state_class `measurement` which is incorrect. kWh entities cannot have a state_class of 'measurement'. They can only be 'total' or 'total_increasing'.
  • Loading branch information
drthanwho authored Nov 4, 2023
1 parent 9a179e1 commit 28e3d81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/midea_ac_lan/midea_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@
"name": "Current Energy Consumption",
"device_class": SensorDeviceClass.ENERGY,
"unit": ENERGY_KILO_WATT_HOUR,
"state_class": SensorStateClass.MEASUREMENT
"state_class": SensorStateClass.TOTAL_INCREASING
},
ACAttributes.realtime_power: {
"type": Platform.SENSOR,
Expand Down

0 comments on commit 28e3d81

Please sign in to comment.