Late WTH with continue_on_error

hi,

The “continue_on_error” option does not work for my scripts/automations, do not know why but i used run in parallel and it solved my problem : “do not crash if something is not okay” so i do not use it anymore.

I need my HVAC to turn off when i leave home, even if my xmas light are disconnected. I think “continue_on_error” not by default is a very coder oriented way to think. is the an utility for this ?

Does a “Mandatory step” checkbox is a easier option for not IT people ?

Hello alfredit,

I can’t tell if you are:

  1. looking for help to solve a problem
  2. reporting a bug
  3. locked into something that can’t change
  4. trying to do a feature request

Whatever this is, this is not going to be very effective in getting you any help.

If you share some code and get out of the XY Problem mode, maybe someone can help.

hi, i’m trying to understand what i am doing wrong and if this is something normal to test all my “variables” when doing a script.

The question is more : is this ever happened to you ? is it normal ? i’ve found a way to work with it but maybe i am not using the software normally

We have no idea how your automation failed, so we can’t answer your question. Start by posting the automation, and if there is an error, post the error from the logs. If there isn’t an error, let us know where you had continue_on_error, and let us know how you know it failed.

2 Likes

hi, thanks for this reply.
I made a script to replicate the error without the “run in parallel” option.

This is a leaving home script : lights of, music off, hvac eco mode. It stopped at the music part with the “continue_on_error” switch.


sequence:
  - action: notify.covercast
    metadata: {}
    continue_on_error: true
    data:
      message: kill
  - action: scene.delete
    metadata: {}
    data: {}
    continue_on_error: true
    target:
      entity_id: scene.salon
  - data: {}
    target:
      area_id:
        - apart
        - edgar
        - salon
        - sdb
        - elisa
      entity_id: media_player.maison
    alias: Stop musique
    action: media_player.media_stop
    continue_on_error: true
  - action: select.select_option
    metadata: {}
    data:
      option: eco
    target:
      entity_id:
        - select.filpilote_edgar_pilot_wire_mode
        - select.filpilote_elisa_pilot_wire_mode
        - select.0x90395efffe2761fa_pilot_wire_mode
    continue_on_error: true
  - data: {}
    alias: Extinction Lumiere
    action: script.light_off
    continue_on_error: true
alias: test
description: ""

Thanks fourr your help.

continue_on_error will not work for errors like that. It only works for errors occurred during the execution of a service call. NotImplementedError comes from a media player that does not support the media_stop service. This is checked before a service call is executed, therefore making continue_on_error miss it.

understood. I used a area to select all my media players at once and never edit the automation again if new media_player is added.
too bad and not very user friendly.

Thanks for the help