Setting a Reimann sum helper to zero

Hello newbie first post!
Objective: to use HA to control EV charger to deliver a set amount of charge where my car is not connected and has no app or inbuilt function to do this.
I have a dashboard with inputs for battery size; starting SoC; End SoC. Also an button input to start the process.
The step I am trying to take is I have set up a Reimann sum helper that takes w value from the internal CT load sensor provided by the myenergi integration, giving me the accumulated Wh delivered to the car. All good this works and looks sufficiently accurate.

What want to do is when the input button is pressed an automation sets or resets the value to the helper to zero. I can then monitor and terminate the charging session once the desired amount is delivered. Been creating the automation by visual config, this has resulted in the following yaml code:

alias: ZappiChargeControlStart
description: ""
  - platform: state
      - input_button.start_charging
condition: []
  - service: number.set_value
      value: "0"
      entity_id: sensor.zappi_charge_added
mode: single

Trigger seem to work OK according to traces, but value of zappi_charge_added is unchanged.
Any help or guidance appreciated.

This service only works on number entities, not sensors.

Use a utility meter to keep track of your total. It has a calibration service you can use to reset it.

Cheers Tom_I solved much appreciated.