Need help restoring Trigger Template sensor value

I have a few Trigger Template sensors that store the value of the Electric Meter at the start of the day or start of the month (called: tpl_mr_daystart and tpl_mr_monthstart). These sensors are used in calculations of energy usage for the day/month by subtracting the current meter reading from tpl_mr_daystart or tpl_mr_monthstart

Definitions are:

  ### Store MeterReader Value at start of everyday. Trigger: Hr: 0, Min: 0
  - trigger:
    - platform: time_pattern
      # This will update every night
      hours: 0
      minutes: 0
    sensor:
      - name: tpl_mr_daystart
        unique_id: tpl_mr_daystart
        unit_of_measurement: "kWh"
        icon: mdi:calendar
        state: "{{ states('sensor.mr_reading') }}"

  ### Store MeterReader Value at start of every Month. Trigger: Hr: 0, Min: 0
  - trigger:
    - platform: time_pattern
      # This will update every night
      hours: 0
      minutes: 0
    sensor:
      - name: tpl_mr_monthstart
        unique_id: tpl_mr_monthstart
        unit_of_measurement: "kWh"
        icon: mdi:calendar
        state: >
          {% if now().day == 1 %} {{ states('sensor.mr_reading') }}
          {% endif %}

As per the documentation, these sensors should restore their state on startup.

However, these sensors are unavailable anytime HA is restarted or Template Entities are reloaded from Dev Tools → YAML → Template Entities

What is the best way to restore the state at startup or Template reload ?

PS: I don’t want to restore the state (by adding homeassistant start as the Trigger) since that would store the latest value. I want to store the value as of 12am start of day, or 12 am of 1st day of the month.