#Error handling in automations

1 messages · Page 1 of 1 (latest)

lusty saffron
#

How does one go about handling errors in automations?
For example I've been getting errors like this Error: Failed to send request: Device did not respond in certain automations lately. As you can see, there are many steps after this failure, and I'd like them to execute even if this particular step fails. How can I do that?

alias: Someone has left
description: Close garage door when A or B leaves
triggers:
  - entity_id:
      - person.a
      - device_tracker.b_2
    from: home
    trigger: state
actions:
  - data:
      title: Arrive/Depart
      message: "{{ trigger.to_state.name }} is {{ trigger.to_state.state }}"
    action: notify.pushover
  - device_id: 5...7
    domain: cover
    entity_id: 2...b
    type: close
    enabled: true
  - alias: <snip>
    if:
      - condition: numeric_state
        entity_id: zone.home
        below: 1
    then:
      - action: light.turn_off
        metadata: {}
        data: {}
        target:
          label_id: lighting
      - action: input_boolean.turn_off
        metadata: {}
        data: {}
        target:
          entity_id:
            - input_boolean.allow_light_change_k
            - input_boolean.allowlightchangel
            - input_boolean.allow_light_change_o
      - alias: Run Rosie
        if:
          - condition: state
            entity_id: input_boolean.rosie_has_run
            state: "off"
        then:
          - action: vacuum.start
            metadata: {}
            data: {}
            target:
              entity_id:
                - vacuum.q5_pro
            enabled: true
          - action: input_boolean.turn_on
            data: {}
            target:
              entity_id: input_boolean.rosie_has_run
      - action: switch.turn_off
        metadata: {}
        data: {}
        target:
          entity_id:
            - switch.tasmotacurlingiron_curling_iron
            - switch.guest_bath_curling_iron_plug_switch
        alias: Turn off curling irons
mode: single
#

Of course, it would be best to figure out the source of the error and eliminate that, but so far, I haven't had success in doing so.