MQTT sensors: Last reset missing

Hi there,

i got a few sensors in my MQTT.yaml file:

  • name: total Solar
    state_topic: /Total_Solar
    unit_of_measurement: “kWh”
    device_class: energy
    state_class: measurement
    last_reset_topic: ‘/Total_Solar’
    last_reset_value_template: >
    {{‘1970-01-01T00:00:00+00:00’}}

but they don’t reset, i tried a few reset possiblilties (even chat gpt) but i keep getting the error:
Last reset missing
The following entities have state class ‘measurement’ but ‘last_reset’ is missing:
*** sensor.total_solar**

the sensor is reading correctly in the States window, but the energy dashbord isn’t updating because of the error.
i’m all out of ideas.

setup: Victron Cerbox GX

If that sensor is actual energy (kWh), then set its state_class to total

Thank you :slight_smile: the warning is gone! really appriciated!