#Hi, I have a weird problem with my
1 messages · Page 1 of 1 (latest)
I checked, using MQTTX, the MQTT output and the messages arrive in the mqtt server for HA (though I can't seem to listen to the topics using the HA web interface)
I can still show the current energy usage and delivery, but the totals for tariff1/2, both in and out don't have values any more in HA
have you checked the HA entity to see if it has data?
the energy dashboard doesnt process data, it just displays it
Currently the entities have the value "unknown", but it has worked for years until last week.
The only thing I did was update HA
The entity looks like this in the source:
- name: energy_consumption_tariff_1
state_topic: "energy/dsmr/electricity/used-tariff-1"
force_update: true
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
last_reset_value_template: "{{ '1970-01-01T00:00:00+00:00' }}"
# state_class: measurement
value_template: "{{ value | float }}"
And the others similar
This is what the mqtt message looks like in MQTTX
Yes, so there is some issue with your mqtt sensor
You don't need the last reset value template btw
Interestingly, when I comment out the last reset value template, I got it working again. So I guess it isn't a question of not needing, but apparently it got to be wrong?
not really sure
The only change I made was comment out the lines with last_reset_value_template, after reloading I got values again in HA and my energy dashboard worked the same as before the 2024.2.x upgrade. So it seems there is a change in the latest release that breaks when last_reset_value_template is set. Would this be a bug in core? I think it's not the dashboards, because as you said, they only display the values, but the values were not even there.
I dont think this is a bug
if you want help with templates #templates-archived is the place, I have no idea what last_reset_value_template does
I imagine the value could be used to have an always increasing value even though the meter is reset at some point, starting again at 0. I'm not sure it's a bug either, but something changed with the upgrade that barfed over my configuration it seems. Maybe the last_reset_value_template now requires a last pre-reset value to be a valid configuration?