Another nested conditions question - Please help!

I’m having trouble getting these nested conditions to fire. Any help would be greatly appreciated!

Pseudo code:
(
Today is a work day
AND the time is after 9:30 am
)
OR
(
Today is NOT a work day
AND the time is after 10:30 am
)

Current actual code:

  condition:
    condition: or
    conditions:
      - condition: and
        conditions:
          - condition: state
            entity_id: binary_sensor.workday  # Today is a work day
            state: 'on'
          - condition: time
            after: '9:30:00' 

        conditions:
          - condition: state
            entity_id: binary_sensor.workday  # Today is a weekend or holiday
            state: 'off'
          - condition: time
            after: '10:30:00' 

You’re close. Try this:

  condition:
    condition: or
    conditions:
      - condition: and
        conditions:
          - condition: state
            entity_id: binary_sensor.workday  # Today is a work day
            state: 'on'
          - condition: time
            after: '9:30:00' 
      - condition: and
        conditions:
          - condition: state
            entity_id: binary_sensor.workday  # Today is a weekend or holiday
            state: 'off'
          - condition: time
            after: '10:30:00' 
1 Like

Thanks! So it looks like the only thing that was missing was the additional “- condition: and” above the last set of conditions, correct?