Automation UI needs an option to ignore unexpected triggers when state changes from or to "unavailable" or "unknown"

Adding condition checks in the automation seems to do the trick:

trigger:
  - platform: state
    entity_id:
      - input_button.test_button
    not_from:
      - unavailable
      - unknown
    not_to:
      - unavailable
      - unknown
condition:
  - condition: template
    value_template: "{{ trigger.from_state is not none }}"
  - condition: template
    value_template: "{{ trigger.to_state is not none }}"
action:
  - service: input_boolean.toggle
    data: {}
    target:
      entity_id: input_boolean.test_light
mode: single
1 Like