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: >

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!