Everything was working properly until mid of October 2024 (guess I installed a new update at this time).
So I have a SmartMeterReader via Tasmota which is sending the data to HA. While statistics seems to work fine, I now see totally ridiculous values a couple of times per day.
So of course I can go into the statistics and adjust the values:
But this is a pain in the butt as this now happens multiple times per day.
The bad thing, nothing has changed on the Tasmota SmartReader as well as on the MQTT server, so the issue must be inside HA.
A couple of log entries I could find for this statistics entity are here:
Entity sensor.stromzaehler_verbrauch_aktuell from integration template has state class total_increasing, but its state is not strictly increasing. Triggered by state 559.0 (570.0) with last_updated set to 2024-11-05T12:45:28.664900+00:00. Please create a bug report at Issues · home-assistant/core · GitHub
07:50:10 – (WARNING) Sensor - message first occurred at November 5, 2024 at 13:51:10 and shows up 5 times
Error while dispatching event for sensor.stromzaehler_energie_verbrauch to <Job track state_changed event [‘sensor.stromzaehler_energie_verbrauch’] HassJobType.Callback <bound method EnergyCostSensor._async_state_changed_listener of >>
06:51:09 – (ERROR) helpers/event.py
Entity sensor.stromzaehler_energie_verbrauch from integration template has state class total_increasing, but its state is negative. Triggered by state 51486.293 with last_updated set to 2024-11-06T05:50:59.588715+00:00. Please create a bug report at Issues · home-assistant/core · GitHub
06:51:09 – (WARNING) Sensor
The sensor itself is created via a template sensor:
- sensor:
- name: "Stromzaehler Energie Verbrauch"
unique_id: "stromzaehler_verbrauch"
unit_of_measurement: 'kWh'
device_class: "energy"
state_class: "total_increasing"
state: >
{{ states('sensor.bitshake_smartmeterreader_mt681_total_in') | float }}
So any idea what is happening here? And…even more interesting…how to prevent this…
I was hoping for a HA update that might fix this…but to far…nothing new…
Thanks for your help…