Increased darkness upstairs when people are sleeping
This commit is contained in:
71
scripts.yaml
71
scripts.yaml
@ -1225,7 +1225,7 @@ evening_on_second_floor:
|
|||||||
entity_id: input_boolean.give_me_darkness
|
entity_id: input_boolean.give_me_darkness
|
||||||
state: 'on'
|
state: 'on'
|
||||||
sequence:
|
sequence:
|
||||||
- alias: Set hallway light to nightlight
|
- alias: Turn off hallway light
|
||||||
if:
|
if:
|
||||||
- condition: and
|
- condition: and
|
||||||
conditions:
|
conditions:
|
||||||
@ -1237,65 +1237,63 @@ evening_on_second_floor:
|
|||||||
state: idle
|
state: idle
|
||||||
alias: If hallway and stairwell motion timers are both idle
|
alias: If hallway and stairwell motion timers are both idle
|
||||||
then:
|
then:
|
||||||
- service: input_select.select_option
|
- action: light.turn_off
|
||||||
|
metadata: {}
|
||||||
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id: light.hallway_overhead
|
||||||
- input_select.upstairs_hallway_scenes
|
alias: Turn off hallway light
|
||||||
data:
|
- alias: Set upstairs bathroom scene
|
||||||
option: Nightlight
|
if:
|
||||||
alias: Set hallway light to nightlight
|
|
||||||
- if:
|
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.shower_mode
|
entity_id: input_boolean.shower_mode
|
||||||
state: 'off'
|
state: 'off'
|
||||||
then:
|
then:
|
||||||
- service: input_select.select_option
|
- target:
|
||||||
target:
|
|
||||||
entity_id: input_select.upstairs_bathroom_scenes
|
entity_id: input_select.upstairs_bathroom_scenes
|
||||||
data:
|
data:
|
||||||
option: "{% if is_state('binary_sensor.upstairs_bathroom_occupied','on')
|
option: "{% if is_state('binary_sensor.upstairs_bathroom_occupied','on')
|
||||||
%}\n Adaptive\n{% else %}\n Nightlight\n{% endif %}\n"
|
%}\n Adaptive\n{% else %}\n Single Nightlight\n{% endif %}\n"
|
||||||
alias: Set upstairs bathroom scene
|
action: input_select.select_option
|
||||||
- service: light.turn_off
|
- target:
|
||||||
target:
|
|
||||||
area_id:
|
area_id:
|
||||||
- kallen_bedroom
|
- kallen_bedroom
|
||||||
- emma_bedroom
|
- emma_bedroom
|
||||||
data: {}
|
data: {}
|
||||||
alias: Turn off kids' bedroom lights
|
alias: Turn off kids' bedroom lights
|
||||||
|
action: light.turn_off
|
||||||
- alias: Turn off Master Bedroom Lights
|
- alias: Turn off Master Bedroom Lights
|
||||||
if:
|
if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: timer.master_bedroom_motion_timer
|
entity_id: timer.master_bedroom_motion_timer
|
||||||
state: idle
|
state: idle
|
||||||
then:
|
then:
|
||||||
- service: light.turn_off
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
area_id:
|
area_id:
|
||||||
- master_bedroom
|
- master_bedroom
|
||||||
- master_bedroom_closet
|
- master_bedroom_closet
|
||||||
|
action: light.turn_off
|
||||||
- delay:
|
- delay:
|
||||||
seconds: 1
|
seconds: 1
|
||||||
- service: switch.turn_on
|
- target:
|
||||||
target:
|
|
||||||
entity_id:
|
entity_id:
|
||||||
- switch.adaptive_lighting_kallen_bedroom
|
- switch.adaptive_lighting_kallen_bedroom
|
||||||
- switch.adaptive_lighting_master_bedroom
|
- switch.adaptive_lighting_master_bedroom
|
||||||
- switch.adaptive_lighting_emma_bedroom
|
- switch.adaptive_lighting_emma_bedroom
|
||||||
data: {}
|
data: {}
|
||||||
alias: Re-enable adaptive lighting in bedrooms
|
alias: Re-enable adaptive lighting in bedrooms
|
||||||
- service: switch.turn_off
|
action: switch.turn_on
|
||||||
target:
|
- target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- switch.adaptive_lighting_sleep_mode_kallen_bedroom
|
- switch.adaptive_lighting_sleep_mode_kallen_bedroom
|
||||||
- switch.adaptive_lighting_sleep_mode_master_bedroom
|
- switch.adaptive_lighting_sleep_mode_master_bedroom
|
||||||
- switch.adaptive_lighting_sleep_mode_emma_bedroom
|
- switch.adaptive_lighting_sleep_mode_emma_bedroom
|
||||||
data: {}
|
data: {}
|
||||||
alias: Turn off adaptive lighting sleep mode in bedrooms
|
alias: Turn off adaptive lighting sleep mode in bedrooms
|
||||||
- service: input_text.set_value
|
action: switch.turn_off
|
||||||
target:
|
- target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_text.kallen_bedroom_selected_scene
|
- input_text.kallen_bedroom_selected_scene
|
||||||
- input_text.master_bedroom_selected_scene
|
- input_text.master_bedroom_selected_scene
|
||||||
@ -1303,6 +1301,7 @@ evening_on_second_floor:
|
|||||||
data:
|
data:
|
||||||
value: Adaptive
|
value: Adaptive
|
||||||
alias: Set input texts for bedroom scenes back to Adaptive
|
alias: Set input texts for bedroom scenes back to Adaptive
|
||||||
|
action: input_text.set_value
|
||||||
alias: Give Me Darkness on
|
alias: Give Me Darkness on
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
@ -1321,24 +1320,24 @@ evening_on_second_floor:
|
|||||||
state: idle
|
state: idle
|
||||||
alias: If hallway and stairwell motion timers are both idle
|
alias: If hallway and stairwell motion timers are both idle
|
||||||
then:
|
then:
|
||||||
- service: input_select.select_option
|
- target:
|
||||||
target:
|
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_select.upstairs_hallway_scenes
|
- input_select.upstairs_hallway_scenes
|
||||||
data:
|
data:
|
||||||
option: Nightlight
|
option: Nightlight
|
||||||
alias: Set hallway light to nightlight
|
alias: Set hallway light to nightlight
|
||||||
|
action: input_select.select_option
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.shower_mode
|
entity_id: input_boolean.shower_mode
|
||||||
state: 'off'
|
state: 'off'
|
||||||
then:
|
then:
|
||||||
- service: input_select.select_option
|
- target:
|
||||||
target:
|
|
||||||
entity_id: input_select.upstairs_bathroom_scenes
|
entity_id: input_select.upstairs_bathroom_scenes
|
||||||
data:
|
data:
|
||||||
option: "{% if is_state('binary_sensor.upstairs_bathroom_occupied','on')
|
option: "{% if is_state('binary_sensor.upstairs_bathroom_occupied','on')
|
||||||
%}\n Adaptive\n{% else %}\n Nightlight\n{% endif %}\n"
|
%}\n Adaptive\n{% else %}\n Nightlight\n{% endif %}\n"
|
||||||
|
action: input_select.select_option
|
||||||
alias: Set upstairs bathroom scene
|
alias: Set upstairs bathroom scene
|
||||||
- alias: Check if script is being run by Sunset Lights flow
|
- alias: Check if script is being run by Sunset Lights flow
|
||||||
if:
|
if:
|
||||||
@ -1348,46 +1347,45 @@ evening_on_second_floor:
|
|||||||
then:
|
then:
|
||||||
- stop: Sunset lights don't mess with bedroom light states before bedtime
|
- stop: Sunset lights don't mess with bedroom light states before bedtime
|
||||||
else:
|
else:
|
||||||
- service: light.turn_off
|
- target:
|
||||||
target:
|
|
||||||
area_id:
|
area_id:
|
||||||
- kallen_bedroom
|
- kallen_bedroom
|
||||||
- emma_bedroom
|
- emma_bedroom
|
||||||
data: {}
|
data: {}
|
||||||
alias: Turn off kids' bedroom lights
|
alias: Turn off kids' bedroom lights
|
||||||
|
action: light.turn_off
|
||||||
- alias: Turn off Master Bedroom Lights
|
- alias: Turn off Master Bedroom Lights
|
||||||
if:
|
if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: timer.master_bedroom_motion_timer
|
entity_id: timer.master_bedroom_motion_timer
|
||||||
state: idle
|
state: idle
|
||||||
then:
|
then:
|
||||||
- service: light.turn_off
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
area_id:
|
area_id:
|
||||||
- master_bedroom
|
- master_bedroom
|
||||||
- master_bedroom_closet
|
- master_bedroom_closet
|
||||||
|
action: light.turn_off
|
||||||
- delay:
|
- delay:
|
||||||
seconds: 1
|
seconds: 1
|
||||||
- service: switch.turn_on
|
- target:
|
||||||
target:
|
|
||||||
entity_id:
|
entity_id:
|
||||||
- switch.adaptive_lighting_kallen_bedroom
|
- switch.adaptive_lighting_kallen_bedroom
|
||||||
- switch.adaptive_lighting_master_bedroom
|
- switch.adaptive_lighting_master_bedroom
|
||||||
- switch.adaptive_lighting_emma_bedroom
|
- switch.adaptive_lighting_emma_bedroom
|
||||||
data: {}
|
data: {}
|
||||||
alias: Re-enable adaptive lighting in bedrooms
|
alias: Re-enable adaptive lighting in bedrooms
|
||||||
- service: switch.turn_off
|
action: switch.turn_on
|
||||||
target:
|
- target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- switch.adaptive_lighting_sleep_mode_kallen_bedroom
|
- switch.adaptive_lighting_sleep_mode_kallen_bedroom
|
||||||
- switch.adaptive_lighting_sleep_mode_master_bedroom
|
- switch.adaptive_lighting_sleep_mode_master_bedroom
|
||||||
- switch.adaptive_lighting_sleep_mode_emma_bedroom
|
- switch.adaptive_lighting_sleep_mode_emma_bedroom
|
||||||
data: {}
|
data: {}
|
||||||
alias: Turn off adaptive lighting sleep mode in bedrooms
|
alias: Turn off adaptive lighting sleep mode in bedrooms
|
||||||
- service: input_text.set_value
|
action: switch.turn_off
|
||||||
target:
|
- target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_text.kallen_bedroom_selected_scene
|
- input_text.kallen_bedroom_selected_scene
|
||||||
- input_text.master_bedroom_selected_scene
|
- input_text.master_bedroom_selected_scene
|
||||||
@ -1395,6 +1393,7 @@ evening_on_second_floor:
|
|||||||
data:
|
data:
|
||||||
value: Adaptive
|
value: Adaptive
|
||||||
alias: Set input texts for bedroom scenes back to Adaptive
|
alias: Set input texts for bedroom scenes back to Adaptive
|
||||||
|
action: input_text.set_value
|
||||||
alias: Give Me Darkness off
|
alias: Give Me Darkness off
|
||||||
goodnight_in_basement:
|
goodnight_in_basement:
|
||||||
alias: Goodnight in Basement
|
alias: Goodnight in Basement
|
||||||
|
Reference in New Issue
Block a user