I’d like to be able to stop an automation that is currently running without turning it off and then back on (similar to the way stopping a script works). Yes, one could put the action section into a script, but that feels like a workaround for a service that should already exist.
Something like an automation.stop service?
That said, the recent improvements to automations and scripts are just simply awesome!
What I ended up doing was changing the automation mode to restart and adding a trigger for the condition that should stop the automation. Then I put that in a choose condition with the repeating section I wanted to stop in the default section of the choose. When the automation is triggered by that condition it effectively just stops the previous run and just exits out. This seems to be doing exactly what I wanted.
Some very good points in the discussions you linked out, thank you.
No apologies necessary. Doesn’t hurt to create a WTH topic.
Regarding your solution, a choose action does not require a default. So you could have it only run the sequence if it’s not the new trigger, then leave out the default part. It’s basically an “if” without an “else.”
I also needed this but ended up using a script. My case usage is I have a button that turns laundry light red which indicates toilet is engaged. I then have a couple of timers that indicate the flow of time by changing the colour warmth of the toilet light. After 10 minutes laundry light colour and toilet light colour return to green. This is in case guests forget to press the toilet disengage button on the way out.
When they press the disengage button, it stops the other script so timers and light commands stop running so I can reset lights to green without colours being changed by the other script. Perhaps there is a better way of doing it but I am just a newbie.