RPi-Reporter-MQTT2HA-Daemon icon indicating copy to clipboard operation
RPi-Reporter-MQTT2HA-Daemon copied to clipboard

Add state_class=measurement to sensors

Open upsuper opened this issue 1 year ago • 3 comments

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.

upsuper avatar Jul 14 '24 12:07 upsuper

Good Idea, I'll look this over.

ironsheep avatar Jul 14 '24 21:07 ironsheep

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 avatar Aug 26 '24 14:08 NordFreak

@upsuper & @ironsheep - any news here ?

NordFreak avatar Oct 30 '24 04:10 NordFreak