I currently have a script that perform a series of task to “close” the house when leaving, as shutting down all the lights, locking the door and activating the alarm. Sometimes some of these calls fail and I leave home half open (mostly nuki lock). I was really happy reading in the last update about the introduction of the “continue on error” function HERE and applied it to the relevant actions, for example:
I know the script stops there from the trace, I just cannot post an example because at every reboot I lose the script debug logs.
The Nuki integration throws an error and it doesn’t continue…
For me also is not working with Error: http status: 404, code:-1 - https://api.spotify.com/v1/me/player/play?device_id=blablas: Device not found, reason: None
I’m not familiar with Docker so I search through Google - 22222 Dev Shell and find this add on:
May I ask if I will install that one I can connect and edit above lines?
If yes, how to ssh? Like my HA IP and 22222 port via Putty?
You still need to know how to generate SSH key pair, use a terminal and vi.
I don’t recommend fiddling with the code if you are not completely sure about what you are doing. Any wrong change can brick your HA and any change will be lost after updating HA anyway.
It’s not my first time messing with the code.
I’m familiar with the SSH and SSH keys but I’m not sure about this part of the configuration. I don’t have any interface for entering the key.
Hey, any luck with this yet? I have exactly the same problem with the error 503 with the Nuki lock and wanted to use continue_on_error but I’m a bit hesitant if I read your post…
The problem is that the TV goes from available to unavailable like every minute (yeah, philipls suck and i don’t want to talk about it), so the automation is stopped when this command is performed and the TV happens to be unavailable:
As you can see from the first image, the continue on error is set to true, so i really don’t see why the automation still stops.
And really, it doesn’t matter why the TV becomes unavailable, if there is such an option in the automation it MUST work
Guys, does this “continue on error” works for you in scripts? If i put it in i get an error when reloading scripts (extra keys not allowed) and script is disabled. Where exactly do i put it?
My script:
vklop_radia_pavle:
alias: "Vklop bujenja"
mode: restart
continue_on_error: true #( if i put it here i get an error)
sequence:
# - continue_on_error: true #( if i put it here i also get an error)
- service: script.internetni_radio_turn_on
- service: browser_mod.navigate
data:
path: /pavle-soba/0
browser_id:
- pavle-tab-s2
- delay:
seconds: 1
- if:
- condition: not
conditions:
- condition: state
entity_id: media_player.pavle_internetni_radio
state: "playing"
then:
- service: rest_command.kiosk_pavlesoba_oled_alarm
# - service: rest_command.kiosk_pavlesoba_oled_alarm
- delay:
seconds: 50
- service: button.press
data:
entity_id: button.pavle_dimmer_min
- delay:
seconds: 20
- service: light.turn_on
data:
entity_id: light.pavle_dimmer
brightness_pct: 100
transition: 60
- delay:
seconds: 20
- service: rest_command.kiosk_pavle_rolete_on
- delay:
seconds: 30
- service: rest_command.kiosk_pavlesoba_oled_volume_100
- service: rest_command.kiosk_pavlesoba_oled_vstajanje
- condition: state
entity_id: input_boolean.pavle_dvig_rolete_sluzba
state: "on"
- service: cover.open_cover
entity_id: cover.pavle_roleta
You have to put it in each individual service call like in the OP’s initial example.
+1 for the idea of being able to apply it to the entire script, though.
Aha… ok, in that case i see what i did wrong - i put a dash in front of sentence (my second grayed out line)… silly mistake.
Thanks! I agree, it would be nice to set this for entire script…
but, for now i temporarily solved my problem with “if - then” command (if entitiy is not unavailable…)
The main problem is that my internet radio sometimes goes offline for no reason, and sincer i use that script for alarm clock it’s essential that script continues to run even in that case.
continue_on_error not working for me.
I have a notify.alexa_media which is sometimes unvailable because issues with HACS Alexa Media Player.
When I add continue_on_error: true, the error is always log in HA notification and my automation stops…
Is there a way to bypass this ?
IS this an issue of HA ?
As much as it would be nice to have it for an entire script or automation, you will usually find in your trace only one or maybe two device(s) causing the error, so isolating the device(s) is kind of a troubleshooting step.
Ultimately, the best way would be to work out why it throws the error and solve that issue.
Unfortunately some devices, my SOMA blind motors are one, will randomly throw errors even if they are setup perfectly ( The joys of Bluetooth in this case ). In these cases, just putting the continue on error on the service call for the troublesome device, but not on others, would be the best way to do it.
I would not really rely on using continue on error as a blanket fix on an entire automation or script just because of one or two troublesome device(s), and I think that was the thinking from the Home Assistant team when they made this a per action/service call feature. In theory, you shouldn’t get errors