Add state_class to sensor entities
Hi,
would it be possible to add a state_class to the sensor entities? This change would enable the usage of the statistics cards.
Currently i add the fields using the customization.yaml
The default state_class would be measurement to tell homeassistant to gather the metric values (min/max/average).
For the total uplaod and download sensors i set the state_class to total_increasing which enables the usage of the changed metric.
Further documentation can be found here: https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics.
Thank you for your work :+1:
This would be awesome. If the only change it takes to use the statistics card is this, then I would ditch Grafana and only use HA for monitor my Docker environment.
This has been added in v1.15, so I will close this ticket.
Great job. Thank you!