I’m gradually weaning myself off my reliance of Node Red to hopefully write all my automation’s in YAML. What I’m trying to achieve with the below is turn the heating off if nobody’s home on a weekday during the times specified. I’m pretty sure it’ll work? Just trying to get my head round the nesting of the conditions.
- alias: Morning Heating Watch Dog Weekday - OFF
trigger:
platform: state
entity_id: group.people
to: "away"
condition:
condition: and
conditions:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: or
conditions:
- condition: time
after: "07:00:00"
before: "12:59:00"
- condition: time
after: "13:31:00"
before: "16:59:00"
- condition: time
after: "17:30:00"
before: "22:00:00"
action:
- service: climate.turn_off
data:
entity_id: climate.kitchen, climate.lounge
As always thanks in advance.