googlefit-homeassistant
googlefit-homeassistant copied to clipboard
Add state_class to sensors for long term statistics
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.