dawidchyrzynski / arduino-home-assistant

ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
https://dawidchyrzynski.github.io/arduino-home-assistant/
GNU Affero General Public License v3.0
463 stars 112 forks source link

Feature request: please add setStateClass to HASensor class and HANumber class. #226

Closed gies73 closed 5 months ago

gies73 commented 5 months ago

Please add setStateClass to HASensor class and HANumber class.

The Home Assistant Sensor Entity supports the ¨state_class¨ (https://developers.home-assistant.io/docs/core/entity/sensor/#available-state-classes). The ¨state_class" of a HASensorNumber must be set to be able to use this sensor on the energy management dashboard (https://www.home-assistant.io/docs/energy/faq/#troubleshooting-missing-entities).

Thanks in advance!

dawidchyrzynski commented 5 months ago

Hi @gies73, this feature is already available on the develop branch. It will be officially released soon.