I have a script that runs a handful of fans and an AC on boost mode for 20 minutes, to rapidly decrease temperature. I have a Lovelace button that calls this script.
What I’d like is an ability to a) cancel running the script and b) return to the device states before running the script. B) is optional.
How can i do this? I was looking into script.toggle and script.turn_off but I’m not sure what these even do, they do not seem to do what I want. Thanks!
Yes but what do these actually mean? They do not effect the running devices (the actual fans and AC at all). I understand those cancel the script so steps in the future do not trigger but how do I actually stop what’s happening and return to the pre-run state?
There is a caveat to stopping a running script. You can only stop or cancel a script which has a delay or wait in it. If your script is just a bunch of service calls the script will just execute and won’t give you a chance to cancel it.
Hi folks, this is a really interesting moment with HA. Sure, as @tom_l says, script off makes sense and as @squirtbrnr says, if you trigger a bunch of services or turn on button helpers, these are different entities living their triggered state. What a blow on a head when designing a logic in your HA. So, the solution is to stop the script from executing next steps in the sequence AND (in my situation) if you do not want to have your house flooded, you must immediately shut down the valves that were triggered. Understandably…
Lovely! It’s better if the logic is so straightforward and do not presume our expectations…