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=measurement to sensors #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

upsuper
Copy link

@upsuper upsuper commented Jul 14, 2024

Based on HA's documentation:

Home Assistant has support for storing sensors as long-term statistics if the entity has the right properties. To opt-in for statistics, the sensor must have state_class set to one of the valid state classes: measurement, total or total_increasing.

I think it makes sense for the numeric sensors to be included in long-term statistics, and thus it would be good to include this field in the discovery message.

@ironsheep
Copy link
Owner

Good Idea, I'll look this over.

@NordFreak
Copy link

Good Idea, I'll look this over.

While searching for how to integrate state_class: measurement, I ended up right here. I would also be very pleased if this function could be implemented.

@NordFreak
Copy link

@upsuper & @ironsheep - any news here ?

Adarack added a commit to Adarack/RPi-Reporter-MQTT2HA-Daemon that referenced this pull request Dec 17, 2024
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

Successfully merging this pull request may close these issues.

3 participants