mbillow / ha-chargepoint

Home Assistant ChargePoint EV Charger Integration
MIT License
44 stars 6 forks source link

Energy Output state_class needs to be "total_increasing" #5

Closed brettonw closed 2 years ago

brettonw commented 2 years ago

See https://community.home-assistant.io/t/energy-dashboard-last-reset-missing/406733

In order to work with HA Energy Dashboard, energy output needs to have a state_class of "total_increasing". This might require the addition of a persistent state value, or perhaps an additional value other than just what the API returns.

brettonw commented 2 years ago

Actually, you just need to change the state_class of the energy output sensor in sensor.py from SensorStateClass.MEASUREMENT to SensorStateClass.TOTAL_INCREASING.