Toggle Switch to call a service and return to off (Momentary, Just Like WAKE ON LAN)

Hi I have added the Wake On Lan feature to turn my PC on, the switch returns to its off position.

I have added the RPC Shutdown function which works if I manually call the service.

I would like to add a separate switch to shut my PC down. I need the switch to Call the Service and then return to the off position.

Is this possible, do I need to create a script or is there a momentary action (I have not started using a custom Lovelace panels yet)

Regards, Dave

Use a script.