googlefit-homeassistant icon indicating copy to clipboard operation
googlefit-homeassistant copied to clipboard

Add state_class to sensors for long term statistics

Open think-nice-things opened this issue 1 year ago • 0 comments

Hi,

attached is a small patch sensor.py.txt which adds "state_class" = "measurement" to the sensor attributes. This will enable Long Term Statistics for the sensors. I made it such that it returns state_class = measurement for all sensors. I'm not sure it this is true for the sensors which increase during the day (like for example distance).

It would be nice if you could merge this.

best,

Johannes.

think-nice-things avatar Jan 13 '23 21:01 think-nice-things