Using a template in place of value in utility meter cron line

I am using the yaml setup for my utility meters, and am doing so to get numbers for my “billing month”

In it’s simplest form, a utility meter might look like:

  um_kens_office_computers_billing_month:
    source: sensor.power_computers_kens_office
    name: UM - Kens office computers Billing Month
    cron: "0 0 15 * *"

However, my utility provider may change the meter reading date, so the day of the month is actually in a numeric helper (eg input_number.meter_reading_day_of_month). Is there some way to put this into the cron line instead of hard coding a day-of-the-month?

thanks,
Ken

That option does not support templates.

You could do this instead: do not define a reset cycle for your utility meter, and use the utility meter calibrate service in an automation triggered by an input_datetime / input number to set the meter value to 0.

1 Like

Thanks Tom!

I was wondering if that was the direction I had to go, but thought I would check if I could eliminate that step and do it all at the UM level. If I take out the cron line entirely does that stop the meter from resetting?

Yes it does.

1 Like

Thanks so much for the quick response!