Automation to turn a few zwave devices on and off at different intervals while enabled

I want to create an automation that when running will turn on and off a few zwave devices at different intervals. For example I want to turn zwave switch on for 20 seconds every 1 hour, and I want to turn another zwave switch on for 10 minutes every 30 minutes. And I want a dashboard card to turn it on/off.

It seems simple, but also not. I can create an automation with 2 different actions. Each being a “repeat” loop to turn the device on, delay for a bit, then turn the device off, then delay for another bit.
But this is problematic. First I can’t find a way to create a card which can control the automation. I’ve seen various posts about using a button. However a button doesn’t show the state of the automation (whether it’s on or off). The second issue is that when turned off, I need to ensure the zwave switches are also turned off in case they were on at the time. But maybe I can do this with another automation which is triggered when the card is turned off.

So my thought is an on/off card, which shows the state of the automation (enabled/disabled), will trigger the looping automation when flipped to “on”, and trigger the “off” automation when flipped to “off”.
But this could easily be an X/Y problem. So I’m open to other suggestions or better ways this could be done.