Fix some nighttime lighting weirdness on the second floor

This commit is contained in:
2025-08-26 02:07:05 -04:00
parent eb9cc4c42d
commit 3ed56ff745

View File

@@ -1304,13 +1304,28 @@ evening_on_second_floor:
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 Single Nightlight\n{% endif %}\n" %}\n Adaptive\n{% else %}\n Single Nightlight\n{% endif %}\n"
action: input_select.select_option action: input_select.select_option
- target: - if:
area_id: - condition: state
- kallen_bedroom entity_id: input_boolean.emma_sleeping
- emma_bedroom state: 'off'
data: {} then:
alias: Turn off kids' bedroom lights - action: light.turn_off
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 - alias: Turn off Master Bedroom Lights
if: if:
- condition: state - condition: state
@@ -1491,32 +1506,32 @@ goodnight_on_first_floor:
entity_id: input_boolean.guest_mode entity_id: input_boolean.guest_mode
state: 'on' state: 'on'
then: then:
- service: light.turn_off - target:
target:
area_id: area_id:
- downstairs_bathroom - downstairs_bathroom
- tina_desk - tina_desk
entity_id: light.living_room_lights entity_id: light.living_room_lights
data: {} data: {}
- service: input_select.select_option action: light.turn_off
target: - target:
entity_id: input_select.mud_room_scenes entity_id: input_select.mud_room_scenes
data: data:
option: Nightlight option: Nightlight
action: input_select.select_option
else: else:
- service: light.turn_off - target:
target:
area_id: area_id:
- downstairs_bathroom - downstairs_bathroom
- mud_room - mud_room
- tina_desk - tina_desk
entity_id: light.living_room_lights entity_id: light.living_room_lights
data: {} data: {}
action: light.turn_off
alias: Determine lights based on guest mode
goodnight_on_second_floor: goodnight_on_second_floor:
alias: Goodnight on Second Floor alias: Goodnight on Second Floor
sequence: sequence:
- service: light.turn_off - target:
target:
area_id: area_id:
- emma_bedroom - emma_bedroom
- kallen_bedroom - kallen_bedroom
@@ -1524,21 +1539,24 @@ goodnight_on_second_floor:
- master_bedroom_closet - master_bedroom_closet
- upstairs_hallway - upstairs_hallway
data: {} data: {}
- if: action: light.turn_off
- alias: If Kallen is gone overnight, turn off upstairs bathroom lights
if:
- condition: state - condition: state
entity_id: input_boolean.kallen_overnight entity_id: input_boolean.kallen_overnight
state: 'on' state: 'on'
then: then:
- service: light.turn_off - target:
target:
area_id: upstairs_bathroom area_id: upstairs_bathroom
data: {} data: {}
action: light.turn_off
else: else:
- service: input_select.select_option - target:
target:
entity_id: input_select.upstairs_bathroom_scenes entity_id: input_select.upstairs_bathroom_scenes
data: data:
option: Single Nightlight option: Single Nightlight
action: input_select.select_option
alias: Set upstairs bathroom lights to single nightlight
morning_scene: morning_scene:
alias: Morning Scene alias: Morning Scene
sequence: sequence: