How to set energy sensor total to zero with automation

I have created an energy sensor which I periodically want to reset to 0 based on a calendar entry. I’ve created the calendar event but I cannot see how to define the action in the automation to reset the sensor.energy_spent value to 0. Can anyone tell me how to do this ?

Use a utility meter. It has reset and calibrate services.