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

Mixed and/or conditions

$
0
0

@laurentiun wrote:

Hello,

Could someone help me please to validate this config?
I’m trying to power on a device when somebody is home, but only between certain hours.

’ ’ ’

- alias: "high umidity home"
  trigger:
    platform: numeric_state
    entity_id: sensor.bedroom_humidity
    above: 62
  action:
     service: switch.turn_on 
     entity_id: switch.prel_bedroom
condition:
      - condition: state
        entity_id: 'device_tracker.al_iphone'
        state: 'home'
  condition: and
  conditions:
      - condition: time
        after: ‘09:00:00’
      - condition: time
        before: ‘11:59:00’
      - condition: or
        conditions:
        - condition: time
          after: ‘17:00:00’
        - condition: time
          before: ‘19:20:00’

’ ’ ’

Thank you

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95354

Trending Articles