OR condition

Hi, is there any way to create an OR condition using the UI set up of automations rather than the yaml file? I’ve set up the below but I’d like the condition to be an OR so that if either my wife or I are home the light will come on. If I go into the yaml to add an OR condition like the second bit of code pasted below, it throws an error saying that my automations and groups are not correctly configured.

- id: '1581336121347'
  alias: Turn on the lights when the sun is set
  description: ''
  trigger:
  - event: sunset
    offset: 00:30:00
    platform: sun
  condition:
  - condition: zone
    entity_id: person.matt_bridges
    zone: zone.home
  - condition: zone
    entity_id: person.amy
    zone: zone.home
  action:
  - device_id: d6ab6bba6b6c4091a46e169f8f5d5ffd
    domain: light
    entity_id: light.cubby_light
    type: turn_on
- id: '1581336121347'
  alias: Turn on the lights when the sun is set
  description: ''
  trigger:
  - event: sunset
    offset: 00:30:00
    platform: sun
  condition: or
  conditions:
  - condition: zone
    entity_id: person.matt_bridges
    zone: zone.home
  - condition: zone
    entity_id: person.amy
    zone: zone.home
  action:
  - device_id: d6ab6bba6b6c4091a46e169f8f5d5ffd
    domain: light
    entity_id: light.cubby_light
    type: turn_on

Just click condition type in Automation editor and select OR - you can also build fairly complex and, or, nested statements and get pretty creative - w/out editing YAML. I’m on .104.3 fwiw.

1 Like

Screen shot from my phone, but you get the idea

As for your yaml error, it looks like your syntax is wrong.
You’re missing a condition:

From the HA documents:

2 Likes

Thanks for both replies, I completely missed this in my haste to get automating, appreciated, thank you! Amended and will see if it works later!

Let me / us know if this is sufficient for you! Also, after testing, please mark as solved to future viewers are able to quickly find what worked for you.

Thanks, will do!