How to display daily energy values

I have a shelly em hooked up to my board to read all the energy consumed and it displays it via a sensor like this:
image

It is a total value that continues to go up.
Is there any way to break this down by kwh used by day, maybe using a custom:mini-graph-card but I would need to get the daily values first somehow?

1 Like

That’s seems to be just the thing, had no idea it existed :slight_smile:
Thanks

Also I have recorder store data for 7 days, does it mean the utility_meter data will get cleared after 7 days?

Don’t know, never used it, but I would expect that Utility Meter does not maintain historic data, but just the current value.

So recorder purge 7 days should still allow Utility Meter on longer schedules (monthly, etc.).

In the docs it says to create template sensors to compute daily and monthly total usage.

Does that mean these are not enough?

utility_meter:
  daily_energy:
    source: sensor.shellyem_5e26f6_channel_1_energy
    cycle: daily
    tariffs:
      - peak
  ev_daily_energy:
    source: sensor.shellyem_5e26f6_channel_2_energy
    cycle: daily
    tariffs:
      - peak

It says you can, not you must. No need to create them.

However, you need to feed the utility meter with the power value from the Shellys, not the energy value.

Oh ok, are you sure? Because the energy ones are the total kwh used that keep increasing but the power ones are the ones that give the current watts consumed.

Sorry, you’re right. I was getting mixed up with the ESPHome total_daily_energy platform which I use for mine.

That’s ok, thought I had them wrong in there.
I just enabled them there so now I need to wait for the data to accrue.