monitor_docker icon indicating copy to clipboard operation
monitor_docker copied to clipboard

Add state_class to sensor entities

Open khase opened this issue 2 years ago • 1 comments

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:

khase avatar Sep 10 '23 13:09 khase

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.

jokkling avatar Jan 16 '24 13:01 jokkling

This has been added in v1.15, so I will close this ticket.

ualex73 avatar May 25 '24 15:05 ualex73

Great job. Thank you!

jokkling avatar May 26 '24 17:05 jokkling