Energy dashboard and Home Energy consumption

Hi all
I have an instant sensor giving the instant kwh (sensor.wemos_kwh) consumption of my home.
I create 2 utility meters for daily and monthly consumption.

utility_meter:
  energyk_daily:
    source: sensor.wemos_kwh
    cycle: daily
  energyk_monthly:
    source: sensor.wemos_kwh
    cycle: monthly

In Lovelace both energyk_daily and energyk_montly are showing and resetting every day or every month.

Now, i want to add those 2 in the energy dashboard
I click on the energy tab, select energy configuration and select add consumption.
I can’t see those 2 utility_meters ? do you know why ?
Thx

How is that one defined ?

Hi,

it is a wemos sending mqtt (GitHub - alcar21/WemosEM: Cheap power monitor (STC013) with Home Assistant Discover and Wemos D1 Mini / PRO (esp8266))

it is defined like this

- state_topic: "wemos/wemosEM-FD76FB/power"
      name: "Wemos_KWh"
      icon: mdi:current-plug
      unit_of_measurement: "KWh"
      value_template: "{{ value_json.kwh }}"

Try adding

      state_class: total_increasing
      device_class: energy

Then you can add it. The utility meters are useful in itself, but not needed by the dashboard.

If the sensor can also go negative when you deliver energy, it should be state class total. But I saw it could reset monthly, and then total_increasing will be able to cope with it.

This should be “kWh”, which may also be causing issues.

thanks for your help
i did the changes (KWh and state_class) but i can’t see my sensor in energy dashboard

utility_meter:
  energyk_daily:
    source: sensor.wemos_kwh
    cycle: daily

sensor:
    - state_topic: "wemos/wemosEM-FD76FB/power"
      name: "Wemos_KWh"
      icon: mdi:current-plug
      unit_of_measurement: "KWh"
      value_template: "{{ value_json.kwh }}"
      state_class: total_increasing
      device_class: energy

Do i have to wait a little to be able to add it ?
thx

@brooksben11 pointed out your unit of measurement is wrong. it’s kWh and not KWh