Prevent statistics to update after reboot or set it only to update a specific time

I created a custom sensor to store the rain last 24H from buienradar every day at 19:30.
I also created a statistics sensor that will stores daily rain sensor for the last 3 days.
When i restart Homeassistant the statistics sensor will add the current value of rain last 24H to the previous value of the statistics sensor (i only want this to happen an a specific time). If i have to do multiple restarts it keeps adding the value of today to the previous value so the value is not accurate anymore.

The custom sensor looks like this:

  - trigger:
    - platform: time
      at: "19:30"
    - name: "Rain Today"
      unique_id: 68363541-71da-429e-87fa-3262cf839e78
      unit_of_measurement: "mm"
      state: >
        {{ states('sensor.buienradar_rain_last_24h') }}
        updated_at: "{{ now() }}" 

and the statistics sensor looks like this:’

 - platform: statistics
    unique_id: e6b88660-42c7-454e-a670-5ee367398a09
    name: "Rain last 3 days"
    entity_id: sensor.rain_today
    state_characteristic: total
      days: 3
    precision: 1 

Any suggestion on how to solve this ?


did you find a solution?
I have a similar issue.

Same topic rain, but with local netatmo data:

  - platform: statistics
    unique_id: niederschlag_letzte_7_tage_in_mm
    name: "Niederschlag letzte 7 Tage in mm"
    entity_id: input_number.niederschlag_gestern_in_mm
    state_characteristic: sum
      days: 7
    sampling_size: 7

Every day one value …