Multiple entities in a condition

Can you use multiple entities in a condition like you can in a trigger?, e.g.

entity_id: input_boolean.foo, input_boolean.bar

If so, can you use AND/OR logic just by changing the keyword?

  condition:
    condition: or
    conditions:
      - condition: state
        entity_id: input_boolean.foo
        state: 'on'
      - condition: state
        entity_id: input_boolean.bar
        state: 'on'

Yes and yes. Examples here: https://www.home-assistant.io/docs/scripts/conditions/#mixed-and-and-or-conditions

You should really search the documents before asking.

Thanks. Sorry but the docs really don’t mention groups in either triggers or conditions.

Well, apparently you can’t do the following (or at least it fails the configuration check).

  condition:
    condition: or
    conditions:
      - condition: state
        entity_id: input_boolean.foo, input_boolean.bar
        state: 'on'

If I defined group.foobar would this behave where either foo or bar having a state “on” would pass the condition?

  condition:
    condition: or
    conditions:
      - condition: state
        entity_id: group.foobar
        state: 'on'

This post shows how to use an !include statement where you can specify your items in a yaml file. Specifying a group in a trigger is different than specifying the elements of a group in a trigger (at least my tests show that) so I’d imagine a condition would be no different.

ETA: It seems to behave exactly the same as a trigger. I guess there is no native way of specifying a multiple items in a single condition and you have to list them individually. Rats.

So - Sanity check and helping for others. : I believe this YAML says “No-one is home” Is that right?

condition: not
conditions:

  • condition: or
    conditions:
    • condition: zone
      entity_id: person.jasmine
      zone: zone.home
    • condition: zone
      entity_id: person.michael
      zone: zone.home
    • condition: zone
      entity_id: person.steve
      zone: zone.home
    • condition: zone
      entity_id: person.tiffany
      zone: zone.home

Or you can check for zone.home < 1