Use logbook entry as a trigger

Hello,

When an automation with a zwave command is executed, sometimes it fails with a log entry:

Logger: homeassistant.components.automation.rolgordijn_dicht_doen
Bron: components/automation/__init__.py:744
integratie: Automatisering (documentatie, problemen)
Eerst voorgekomen: 7 mei 2024 om 22:32:30 (1 gebeurtenissen)
Laatst gelogd: 7 mei 2024 om 22:32:30

Error while executing automation automation.rolgordijn_dicht_doen:

Is it possible to create a trigger where the line

Error while executing automation automation.rolgordijn_dicht_doen:

is set to re-trigger the automation?

Probably something like this:

    trigger:
    - platform: event
      event_type: system_log_event
      event_data:
        level: ERROR
        message: "Error while executing automation automation.rolgordijn_dicht_doen:"

Alternatively, you can specify continue_on_error and handle it in the automation. Post your automation.

Automation:

trigger:
  - platform: state
    entity_id:
      - input_boolean.wakker
    to: "off"
condition:
  - condition: and
    conditions:
      - condition: state
        entity_id: input_boolean.rolluik_is_omhoog
        state: "on"
      - condition: template
        value_template: >-
          {{ (((as_timestamp(now())) -
          (as_timestamp(states.input_boolean.rolluik_is_omhoog.last_changed))))|float
          > 2100 }}
action:
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.rolluik_dicht
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - if:
      - condition: state
        entity_id: switch.rolluik_dicht
        state: unavailable
    then:
      - delay:
          hours: 0
          minutes: 0
          seconds: 5
          milliseconds: 0
      - service: switch.turn_on
        data: {}
        target:
          entity_id: switch.rolluik_dicht
  - service: input_boolean.turn_off
    data: {}
    target:
      entity_id: input_boolean.rolluik_is_omhoog
mode: restart