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

Support state_class so it can be used with Long-term Statistics #44

Open
danielskowronski opened this issue Dec 17, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@danielskowronski
Copy link

As per https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics the state_class seems to be a requirement for exposed attributes to be covered by long-term statistics. This allows them to be rendered in Statistics graph card so it looks like Grafana without Grafana.

It should be fairly easy to pass this additional field to newly created entities.

@pilotak
Copy link
Owner

pilotak commented Dec 17, 2023

Happy to accept PR

@hmakmur
Copy link

hmakmur commented Mar 18, 2024

Until there is a code change, you can easily fix this by adding entry in your customize.yaml. This is how i fixed all those other sensors that lack certain attributes I need.
Example:

sensor.freezer_downstairs:
  state_class: measurement
sensor.pingdrivewaycam_round_trip_time_avg:
  state_class: measurement
sensor.motion_battery:
  state_class: measurement

@pilotak pilotak added the enhancement New feature or request label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants