nickknissen / hass-monta

Monta Home Assistant custom component
MIT License
26 stars 4 forks source link

Add SensorStateClass.TOTAL to "Last meter readering" #129

Open tabro opened 3 weeks ago

tabro commented 3 weeks ago

Checklist

Is your feature request related to a problem? Please describe.

It is not possible to add the "Last meter reading" as a energy source in the "Energy" panel of home assistant when the state_class is not set.

I have patched this locally to be able to add the sensor as a energy source.

Describe the solution you'd like

Add:

state_class=SensorStateClass.TOTAL,

to the "Last meter reader" sensor, in order to add the sensor as a energy source to the Energy panel.

Describe alternatives you've considered

?

Additional context

Thats all