Why do my ESPHome device not have 'last_reset' they did when the energy meter was introduced?

It’s really odd, back when the energy dashboard was added, I added all my ESPHome power monitoring devices to it.
With the later updates, I now see this message:
image
And the stats aren’t updated.
I do have the time configured, like this:

time:
  - platform: homeassistant
    id: homeassistant_time

And the docs say:

# Enable time component to reset energy at midnight
time:
  - platform: sntp
    id: my_time

And the total_daily_energy of course:

  - platform: total_daily_energy
    name: '${device_name} daily energy'
    power_id: power
    unit_of_measurement: kWh
    accuracy_decimals: 5
    state_class: measurement

So what am I missing?

You are missing:
state_class: total_increasing
device_class: energy

Cheers
Phil

1 Like

I see, when did that change? Did I miss that in a changelog, because it worked in the beginning?

From 2021.9 version
Phil

1 Like

I usually read the changelogs, but never saw this.
Are you referring to https://github.com/esphome/esphome/pull/2163
?
That doesn’t say anything about new syntax or anything?

I’ve never added state_class to any of my ESPHOME energy sensors. This is the config I use:

(HA 2021.9.7 ESPHOME 2021.9.2)

  - platform: total_daily_energy
    name: Home Total Daily Energy
    power_id: home_power
    id: totaldailyenergy
    unit_of_measurement: kWh
    accuracy_decimals: 3
    icon: mdi:clock-alert
    device_class: energy

The state_class seems to have been added itself ?

And now I have a coffeemachine that apparently generates energy? :grinning_face_with_smiling_eyes:
image

1 Like

Drink a lot !

1 Like

:rofl: :joy:
I don’t drink coffee, only my wife, darned, then she’ll be up all night, poor me :wink:

O yes it seems good.
You should find it in the Energy parameters
I don’t know where it was written . I found it in the official HA discord
Phil

1 Like

Yes that’s what I meant, I never added state_class and it works with the energy integration