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'
|
2018-04-15 15:13:49 +00:00
|
|
|
- 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
|
2019-12-12 21:19:52 +00:00
|
|
|
- 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
|