Bug - Wait for trigger with multiple state values does not work

The documentation states that multiple values can be provided as part of the “State” for a condition or ‘wait for trigger’.

example:

condition:
  condition: state
  entity_id: alarm_control_panel.home
  state:
    - armed_away
    - armed_home

This is not working as HA is translating this into a single line and fails to pass the condition.

condition:
  condition: state
  entity_id: alarm_control_panel.home
  state:
    - armed_away, armed_home

When will this bug be fixed?

Alternativily, can a ‘state’ support a wildcard, like “armed_*

Bug reference: Automation editor clobbers multiple state conditions · Issue #6664 · home-assistant/frontend · GitHub
Other forum report: Bug in state evaluation

A fix for this is being worked on:

It seem that this PR is being closed, with the preference to use YAML instead. But even when using YAML there is a bug. Hence this fix is not really a fix…

Anyone has a better view on either when it will be fixed? or if I’m doing something wrong I didn’t identify yet ?

You can use yaml instead of the GUI automation editor. Or you can use an OR condition.

Yaml does not work either… I’ve already attempted, but the YAML editor converts it into comma separated array and that one is not well interpreted by Home Assistant…

You can try for yourself as well if you want to assess the complete behaviour…

In my case I got an automation, where within the actions I have a “wait for trigger” that evaluates the WIFI SSID connection of my phone. It only proceeds on 2 values and times out after a few minutes.

action:
  - wait_for_trigger:
      - platform: state
        entity_id: sensor.oneplus_8_pro_wifi_connection
        to: SSID1, SSID2-5Ghz
  - service: script.my_script
    data: {}

The “wait for trigger” never exits…

Like I said, don’t use the editor.

Also not sure where you got the idea the issue is closed. It is still open.

Your other option:

action:
  - wait_for_trigger:
      - platform: state
        entity_id: sensor.oneplus_8_pro_wifi_connection
        to: SSID1
      - platform: state
        entity_id: sensor.oneplus_8_pro_wifi_connection
        to: SSID2-5Ghz
  - service: script.my_script
    data: {}

That’s indeed the option i currently went for… As i was configuring through the UI, adding multiple states through for the “wait for trigger” does not work. It needs to be done through YAML.
Previously I wasn’t aware that we could define multiple entries…

First occurrence yesterday was working when I came home… we’ll see for the next occurrences in the coming days…

Thanks for the help