Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Another nested conditions question - Please help!

$
0
0

@_Mike wrote:

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' 

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>