Utility_Meter reset on specific day

Tags: #<Tag:0x00007f73960b8d60>

Hi!

I’m looking for a way to reset my monthly utility-meter on a specific day instead of the 1st day of the month, since my electricity provider doesn’t bill me on the 1st of each month. I’ve been searching for a way to reset the values and then create an automation for it but unfortunately there doesn’t seem to be a concrete solution for this.

Could anyone help me figure this out?

Thank you!

Use the offset option of the utility meter.

Or if the day changes month to month (due to weekends or whatever) use this service:

utility_meter.reset

You can call it from a button in the frontend.

I have a similar script that I manually call quarterly when I notice the meter reader captured on my front camera. I use a script because I have to clear two meters and their sum which is stored in an input_number.

1 Like

Unfortunately I can’t find the reset option, and if I set it manually it returns an error saying I there’s no service with that name.

image

This is how I have the utility meter configured on my configuration.yaml

utility_meter:
  monthly_energy:
    source: sensor.shelly_em_total
    cycle: monthly
  daily_energy:
    source: sensor.shelly_em_total
    cycle: daily

whereas shelly is configured as:

- platform: mqtt
  name: "shelly_em_total"
  state_topic: "shellies/shellyem-109730/emeter/0/total"
  qos: 2
  unit_of_measurement: "kWh"
  value_template: "{{ (value | float / 1000 ) | round(1) }}"  
  icon: mdi:gauge

Hmm,that’s strange. Did you try if it appears after a restart?

I’ve add the utility meter for more than a month now. I’ve done a lot for restarts meanwhile, however I just did another one just to make sure…aaaand nothing…calibrate is still the only option available.

I’m getting out of ideas soon. You could try commenting out the utility_meter sections, restart, uncomment them again and restart.

Yeah very odd:

ute_serv

Edit: Ah! Thought I remembered something abut needing to define a tariff to be able to use these services:

1 Like

Yes! Adding tariffs did the trick :slight_smile:

image

Thanks a lot!

Now I can also play with offset to make my second part of the question work.

1 Like