Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add state_class to sensors for long term statistics #15

Open
think-nice-things opened this issue Jan 13, 2023 · 0 comments
Open

Add state_class to sensors for long term statistics #15

think-nice-things opened this issue Jan 13, 2023 · 0 comments

Comments

@think-nice-things
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant