Automation condtion condition:state using 'match: any' error

I’m trying to simplify my home presence detection setup, and the logs are showing an error when I attempt the following configuration.

input_boolean:
  at_home:
    name: If either Bob or Alice is at Home, set to on

automation:
  - id: presence_at_home
    alias: 'Someone Arrived at empty Home'
    trigger:
      - platform: state
        entity_id:
          - person.alice
          - person.bob
        to: 'Home'
    condition:
      condition: state
      entity_id: input_boolean.at_home
      state: 'off'
    action:
      - service: input_boolean.turn_on
        entity_id: input_boolean.at_home

  - id: presence_not_home
    alias: 'Last person left occupied Home'
    trigger:
      - platform: state
        entity_id:
          - person.alice
          - person.bob
        to: 'Away'
    condition:
      and:
        - condition: state
          entity_id: input_boolean.at_home
          state: 'on'
        - not:
            - condition: state
              entity_id:
                - person.alice
                - person.bob
              match: any <========== This is the problem line
              state: 'Home'
    action:
      - service: input_boolean.turn_off
        entity_id: input_boolean.at_home

Note, I KNOW there are many alternate ways of doing this (groups, for example), but the above code is a GREATLY simplified version of what I’m trying to do (I have multiple locations, and multiple states over and above ‘Home’ and ‘Away’, but the above snippet is a simplification to show the issue).

From reading the docs at Conditions - Home Assistant, I would think match: any would be allowed, but when I add it, I get the following error:

Invalid config for [automation]: [match] is an invalid option for [automation]. Check: automation->match. (See ?, line ?).

Note, no line #, but since I only use match in the one location, it has to be that. If i remove the match line, I get a different error, but syntactically, everything looks correct.

If I use the alternate declaration format, I get a similar error:

    condition:
      condition: and
      conditions:
        - condition: state
          entity_id: input_boolean.at_home
          state: 'on'
        - condition: not
          conditions:
            - condition: state
              entity_id:
                - person.alice
                - person.bob
-->           match: any
              state: 'Home'

Any help is greatly appreciated!

Are you running HA 2022.5, where that option was introduced?

It was just released? Crap, that explains it. I’ll update it after verifying the stock setup. I just looked through the release notes, and it’s certainly not obvious that match: any was just added. Although, it was obvious that not_from and not_to were just added.

It’s in the “Other noteworthy changes” section:

  • State conditions with multiple entities can now also match if any of the entities match the condition (instead of all), thanks @frenck!

But yes, I had trouble finding it as well.

Thanks again, I just verified the syntax works with 2022.5.2, so it’s a new addition.