Upstairs bathroom now responds correctly to "adaptive on second floor"

This commit is contained in:
2023-02-10 13:09:11 -05:00
parent e410b4b080
commit e34d9dad98

View File

@ -679,42 +679,6 @@ script:
entity_id: input_text.upstairs_hallway_selected_scene
data:
value: Adaptive
# - if:
# - condition: state
# entity_id: binary_sensor.upstairs_bathroom_motion
# state: 'on'
# then:
# - service: input_select.select_option
# target:
# entity_id: input_select.upstairs_bathroom_scenes
# data:
# option: Adaptive
# else:
# - if:
# - condition: state
# entity_id: binary_sensor.early_night_mode
# state: 'on'
# then:
# - service: input_select.select_option
# target:
# entity_id: input_select.upstairs_bathroom_scenes
# data:
# option: Nightlight
# else:
# - service: light.turn_off
# target:
# entity_id: light.upstairs_bathroom_lights
# - service: switch.turn_on
# target:
# entity_id: switch.adaptive_lighting_upstairs_bathroom
# - service: switch.turn_off
# target:
# entity_id: switch.adaptive_lighting_sleep_mode_upstairs_bathroom
# - service: input_text.set_value
# target:
# entity_id: input_text.upstairs_bathroom_selected_scene
# data:
# value: Adaptive
- if:
- condition: state
entity_id: light.master_bedroom_lights
@ -781,6 +745,56 @@ script:
entity_id: input_text.emma_bedroom_selected_scene
data:
value: Adaptive
- choose:
- conditions:
- condition: state
entity_id: input_boolean.shower_mode
state: 'on'
sequence:
- stop: "Shower mode is on"
- conditions:
- condition: state
entity_id: binary_sensor.upstairs_bathroom_motion
state: 'on'
sequence:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_bathroom_scenes
data:
option: Adaptive
- conditions:
- condition: template
value_template: "{{ is_state('binary_sensor.upstairs_bathroom_motion','off') and is_state('timer.upstairs_bathroom_motion_timer','active') }}"
sequence:
- service: timer.finish
target:
entity_id: timer.upstairs_bathroom_motion_timer
default:
- if:
- condition: state
entity_id: binary_sensor.early_night_mode
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_bathroom_scenes
data:
option: Nightlight
else:
- service: light.turn_off
target:
entity_id: light.upstairs_bathroom_lights
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_upstairs_bathroom
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_upstairs_bathroom
- service: input_text.set_value
target:
entity_id: input_text.upstairs_bathroom_selected_scene
data:
value: Adaptive
scene:
- name: Adaptive in Living Room