I recently ran into a perfect use-case for continue on error. A one-time communications error with a z-wave switch stopped the execution of an seven-step script on its first step. That script runs every day - it has never died prematurely before. The z-wave switch acted like nothing wrong ever happened. This particular script has such a high wife acceptance factor that its failure was the first thing she asked about that morning.
I can’t duplicate the problem and have no useful info to debug it with. It probably won’t happen again for quite a long time.
However, no matter how I tried to follow the documentation (which seems to apply to just one form of yaml), I couldn’t add continue_on_error and get it to stick. Either the UI rejected my syntax choices, or silently refused to save them.
While I understand that continue_on_error is a little controversial, I wonder if thinking about it, or similar exception handling tools for scripts and automations, wouldn’t benefit from some love? I can’t be the only user who would like tools that could let me create a little thoughtful immunity from spousal disappointment.
For example, failing a way to add continue_on_error to the UI, could we at least document how it would work in a script that looks (in part) like this:
alias: Living Room Daylight
sequence:
- type: turn_on
device_id: 1883c0c0bf934f0a6fcb38c2b0ff0940
entity_id: e165c2c377e6e9d7e3c1ed715a8ed21c
domain: light
brightness_pct: 75
Or better yet, create try: and except: facilities for scripts and automations?