bram2202 / esp8266-dsmr

A ESP8266 based DSMR reader, posting onto MQTT
MIT License
35 stars 14 forks source link

HomeAssistant 2022.2 compatibility #25

Open w3host opened 2 years ago

w3host commented 2 years ago

Hi Bram2202,

Thanks for this project.

I have received some "last_reset" errors in HA 2022.2 and stopped working Energy usage graph : Entity sensor.esp_dsmr_dcf007_power_consumption (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) with state_class measurement has set last_reset. Setting last_reset for entities with state_class other than 'total' is not supported.

I have updated sensors and it is working again for me again: https://github.com/w3host/esp8266-dsmr/commit/6e8aa0fd25020e2803a108cc0b077d0935abb865

Regards,

Krisz

bram2202 commented 2 years ago

Hey,

There ware some changes regarding the last_reset in HA the a few releases ago. Your changes look ok, can you create a PR for this?

Dutchone commented 2 years ago

Beware this is not based off the 13.3 update with the gas fix

Zephael86 commented 2 years ago

Hi, not an expert in git and in programming. I applied the above changes, reflashed esp8266 and no more MQTT error messages in HA 2022.7.7 Energy graph is working.