Sum Up Sensor values

Hi,
I nearly spent all day trying to figure this out:
I got a mqtt sensor that pushes a value every 5 minutes.
All I want is a way to add these values up, until I set it to zero.

I tried many different approaches, Utility meter, etc.

My nearest approach is a Template sensor with this config:

  - platform: template
    sensors:
      kwh_sumup:
        friendly_name: "Sum kwH"
        unit_of_measurement: 'kwH'
        value_template: "{{ states('sensor.kwh_sumup') | float + states('sensor.FerrarisWheelspins') | float }}"

But my problem is: when the Sensor Value of the MQTT sensor gets a “5” the kwh_sumup template sensor adds the 5 two times and so on.

Does anyone have a suggestion?

How often will you set it to zero?
Is it a rare thing or daily?

I think this will depend.
If it would be daily, I thought the Utility Meter would be good, but it doesnt seem to work for my problem.