Switch to change sensor state

I have an electrical meter which is a zwave sensor entity.
I would like to have a switch which resets the state to zero (see screen shot below taken from the developer tools/states).
How can I achieve this? (I have basic experience of automations/configuration etc. only).

Thanks in advance.

I have some appdaemon apps that set the state (internally in HASS, they don’t change anything physical).

E.g. (see the “set_state” at the bottom):

You might be able to do the same with automations, but I’m not sure about the exact way to do that.

Also, I’m not sure if the state (or or any attribute) would start counting from zero again, or if it stores something in the actual switch, and the next state update would just be continuing form where you were. I think you’d have to just try and see that part.

Thanks for the reply, but that’s a little over my head :face_with_monocle:
Are there simpler solutions?