Home-AssistantConfig/automation/late_night_helper.yaml
2017-02-11 04:21:47 +00:00

63 lines
1.5 KiB
YAML
Executable File

###################################
## Late Night lights Section
###################################
- alias: 'Late Night Helper'
trigger:
- platform: state
entity_id:
- binary_sensor.upstairs_away_mode
- binary_sensor.downstairs_away_mode
state: 'off'
- platform: state
entity_id:
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed
state: 'on'
for: '00:05:00'
- platform: state
entity_id: group.family
state: home
- platform: state
entity_id: group.garage_doors
state: 'open'
for: '00:01:30'
condition:
condition: and
conditions:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: time
after: '20:00:00'
before: '02:00:00'
action:
- service: light.turn_on
entity_id:
- group.living_room_accents
- light.living_room_slider
- light.foyer_door
- light.fridge
- light.M1_front_right
- light.S1
- light.S4
data:
brightness: 150
- service: switch.turn_on
entity_id: switch.kitchen_accents
- service: switch.turn_on
entity_id: switch.living_room_outlet
- service: switch.turn_on
entity_id: switch.foyer_outlet
- service: script.front_house_motion
- service: light.turn_off
entity_id:
- light.S1
- light.S4
- light.foyer_door
- light.fridge