2018-01-02 00:00:45 +00:00
|
|
|
######################################################################
|
|
|
|
## Good night Routine
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
- alias: 'Good Night Trigger'
|
2020-07-20 18:33:03 +00:00
|
|
|
id: 26846f7b-bc76-43d2-99be-af552da7700f
|
2018-01-02 00:00:45 +00:00
|
|
|
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
|
2020-08-08 23:10:36 +00:00
|
|
|
entity_id: person.carlo
|
2018-04-15 15:13:49 +00:00
|
|
|
state: 'not_home'
|
|
|
|
- condition: or
|
|
|
|
conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
|
|
|
|
state: 'on'
|
|
|
|
- condition: state
|
2020-08-08 23:10:36 +00:00
|
|
|
entity_id: person.stacey
|
2018-04-15 15:13:49 +00:00
|
|
|
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
|
2020-10-03 20:07:29 +00:00
|
|
|
entity_id: group.outdoor_seasonal
|
2018-01-02 00:00:45 +00:00
|
|
|
- service: script.interior_off
|
2020-08-14 15:23:29 +00:00
|
|
|
|
|
|
|
- wait_template: "{{ states.media_player.master_bedroom.state == 'standby' }}"
|
|
|
|
timeout: '00:30:00'
|
|
|
|
|
|
|
|
- service: homeassistant.turn_off
|
|
|
|
entity_id: group.landscaping
|