Utility meter jumps even when using periodically_resetting

I am struggling to setup a Utility Meter to track electricity net metering over a period, using data returned by an unflashed Emporia Vue using an HACS integration.

I setup a Utility Meter with what I think are the appropriate settings but it jumps at midnight when the source sensor resets to 0. Specifically, I’ve set both periodically_resetting and net_consumption to true because the source resets at midnight and goes up or down throughout the day depending on solar production.

My first attempt at the Utility Meter was using a sensor that didn’t reset to precisely 0 at midnight, which I presumed was an issue, but all indications are that the current, templated source sensor does reset to precisely 0, as shown in the screenshot below and confirmed by bumping the display precision to many 0s (but not shown here).

Grateful for any insight into what may be happening here. Thank you.

Symptom

Utility Meter config

utility_meter:
  net_metering_surplus_energy_monthly:
    name: Net metering surplus current bill
    source: sensor.net_metering_surplus_daily
    cron: "0 0 15 * *" #15th of month
    net_consumption: true
    periodically_resetting: true
    always_available: true

Source sensor config
Template sensor setup as a Helper (unable to add a second screenshot because I’m a first time poster).

  • State template:
    {{ states('sensor.mainstogrid_energy_today')|float - states('sensor.mainsfromgrid_energy_today')|float }}
  • Unit of measurement: kWh
  • Device class: Energy
  • State class: Total