Fix some nighttime lighting weirdness on the second floor
This commit is contained in:
58
scripts.yaml
58
scripts.yaml
@@ -1304,13 +1304,28 @@ evening_on_second_floor:
|
||||
option: "{% if is_state('binary_sensor.upstairs_bathroom_occupied','on')
|
||||
%}\n Adaptive\n{% else %}\n Single Nightlight\n{% endif %}\n"
|
||||
action: input_select.select_option
|
||||
- target:
|
||||
area_id:
|
||||
- kallen_bedroom
|
||||
- emma_bedroom
|
||||
data: {}
|
||||
alias: Turn off kids' bedroom lights
|
||||
action: light.turn_off
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emma_sleeping
|
||||
state: 'off'
|
||||
then:
|
||||
- action: light.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
area_id: emma_bedroom
|
||||
alias: If Emma's bedroom is not in use, turn off her bedroom light
|
||||
- alias: If Kallen's bedroom is not in use, turn off his bedroom light
|
||||
if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_sleeping
|
||||
state: 'off'
|
||||
then:
|
||||
- action: light.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
area_id: kallen_bedroom
|
||||
- alias: Turn off Master Bedroom Lights
|
||||
if:
|
||||
- condition: state
|
||||
@@ -1491,32 +1506,32 @@ goodnight_on_first_floor:
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'on'
|
||||
then:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
- target:
|
||||
area_id:
|
||||
- downstairs_bathroom
|
||||
- tina_desk
|
||||
entity_id: light.living_room_lights
|
||||
data: {}
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
action: light.turn_off
|
||||
- target:
|
||||
entity_id: input_select.mud_room_scenes
|
||||
data:
|
||||
option: Nightlight
|
||||
action: input_select.select_option
|
||||
else:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
- target:
|
||||
area_id:
|
||||
- downstairs_bathroom
|
||||
- mud_room
|
||||
- tina_desk
|
||||
entity_id: light.living_room_lights
|
||||
data: {}
|
||||
action: light.turn_off
|
||||
alias: Determine lights based on guest mode
|
||||
goodnight_on_second_floor:
|
||||
alias: Goodnight on Second Floor
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
- target:
|
||||
area_id:
|
||||
- emma_bedroom
|
||||
- kallen_bedroom
|
||||
@@ -1524,21 +1539,24 @@ goodnight_on_second_floor:
|
||||
- master_bedroom_closet
|
||||
- upstairs_hallway
|
||||
data: {}
|
||||
- if:
|
||||
action: light.turn_off
|
||||
- alias: If Kallen is gone overnight, turn off upstairs bathroom lights
|
||||
if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_overnight
|
||||
state: 'on'
|
||||
then:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
- target:
|
||||
area_id: upstairs_bathroom
|
||||
data: {}
|
||||
action: light.turn_off
|
||||
else:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
- target:
|
||||
entity_id: input_select.upstairs_bathroom_scenes
|
||||
data:
|
||||
option: Single Nightlight
|
||||
action: input_select.select_option
|
||||
alias: Set upstairs bathroom lights to single nightlight
|
||||
morning_scene:
|
||||
alias: Morning Scene
|
||||
sequence:
|
||||
|
||||
Reference in New Issue
Block a user