Home assistant energy - negative cost

My energy dashboard seems to start the day OK, but allways ends with negative COST values…

I am using a fixed cost value in all of them…

What I am doing wrong?

The kWh sensors never reset.

I think i found the reason! the cost sensor is reseting everyday at 9PM (Brazilian Time).

Now i need to discover how to change the counter reset hour… :slight_smile:

Hi @gustavocmorais did you get this sorted in the end? Having the same issue…


now I am using the new state_class named total_increasing, avoiding reset the counter.

- platform: mqtt
    name: "elsys_kwh_2"
    unique_id: "elsys_kwh_2"
    state_topic: "/v1.6/devices/elsys_bcddc2c70f08/emw3"
    value_template: "{{ value_json.context.consumo_kwh_2 }}"
    device_class: energy
    state_class: total_increasing
    unit_of_measurement: "kWh"

Yeap, done the same in the end, thanks ^^