Home-AssistantConfig/config/automation/good_night.yaml

47 lines
1.3 KiB
YAML
Raw Normal View History

2018-01-02 00:00:45 +00:00
######################################################################
## Good night Routine
######################################################################
- alias: 'Good Night Trigger'
trigger:
- platform: state
entity_id: input_boolean.good_night
to: 'on'
from: 'off'
- platform: state
entity_id:
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
state: 'on'
- condition: state
entity_id: device_tracker.carlo
state: 'not_home'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
state: 'on'
- condition: state
entity_id: device_tracker.stacey
state: 'not_home'
2018-01-02 00:00:45 +00:00
action:
- service: input_boolean.turn_off
entity_id: input_boolean.good_night
- service: homeassistant.turn_off
2019-12-01 01:11:07 +00:00
entity_id: group.outdoor_xmas_lights
2018-01-02 00:00:45 +00:00
- service: script.interior_off