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'
|
2022-01-21 16:41:52 +00:00
|
|
|
- condition: time
|
|
|
|
after: "15:00:00"
|
|
|
|
before: "04:00:00"
|
2018-01-02 00:00:45 +00:00
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.guest_mode
|
|
|
|
state: 'off'
|
2022-01-21 16:41:52 +00:00
|
|
|
|
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
|
2023-04-18 19:36:59 +00:00
|
|
|
- service: homeassistant.turn_off
|
|
|
|
entity_id: switch.kitchen_accent_2
|
|
|
|
- service: homeassistant.turn_off
|
|
|
|
entity_id: group.master_bathroom_accents
|
|
|
|
|
2018-01-02 00:00:45 +00:00
|
|
|
- service: script.interior_off
|
2020-08-14 15:23:29 +00:00
|
|
|
|
2021-07-26 20:16:49 +00:00
|
|
|
- alias: 'Bed Presence AMP Trigger'
|
|
|
|
id: 26846f7b-bc76-43d2-99be-af552d2300f
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id:
|
|
|
|
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed
|
|
|
|
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed
|
|
|
|
to: 'on'
|
|
|
|
id: "in_bed"
|
|
|
|
- platform: state
|
2021-07-27 14:17:30 +00:00
|
|
|
entity_id: group.bed
|
2021-07-26 20:16:49 +00:00
|
|
|
to: 'off'
|
|
|
|
id: "out_of_bed"
|
|
|
|
|
|
|
|
action:
|
|
|
|
choose:
|
2021-08-04 18:54:49 +00:00
|
|
|
- alias: "SomeOne in Bed"
|
2021-07-27 14:17:30 +00:00
|
|
|
conditions:
|
|
|
|
- condition: trigger
|
|
|
|
id: in_bed
|
2021-07-26 20:16:49 +00:00
|
|
|
sequence:
|
|
|
|
- service: homeassistant.turn_off
|
|
|
|
target:
|
|
|
|
entity_id: switch.lr_amp
|
2023-05-30 20:48:27 +00:00
|
|
|
- service: homeassistant.turn_off
|
|
|
|
target:
|
|
|
|
entity_id:
|
|
|
|
- switch.kitchen_accent_2
|
2024-09-06 16:29:57 +00:00
|
|
|
- light.outdoor_bathroom
|
2023-05-30 20:48:27 +00:00
|
|
|
- group.master_bathroom_accents
|
2024-03-07 17:25:23 +00:00
|
|
|
- group.landscaping
|
2024-09-06 16:29:57 +00:00
|
|
|
|
2021-07-26 20:16:49 +00:00
|
|
|
default:
|
|
|
|
- service: homeassistant.turn_on
|
|
|
|
target:
|
|
|
|
entity_id: switch.lr_amp
|