Multi-room scenes leave upstairs bathroom alone if shower mode is on
This commit is contained in:
@ -991,56 +991,55 @@ script:
|
|||||||
entity_id: input_text.emma_bedroom_selected_scene
|
entity_id: input_text.emma_bedroom_selected_scene
|
||||||
data:
|
data:
|
||||||
value: Adaptive
|
value: Adaptive
|
||||||
- choose:
|
- if:
|
||||||
- conditions:
|
- condition: state
|
||||||
- condition: state
|
entity_id: input_boolean.shower_mode
|
||||||
entity_id: input_boolean.shower_mode
|
state: 'off'
|
||||||
state: 'on'
|
then:
|
||||||
sequence:
|
- choose:
|
||||||
- stop: "Shower mode is on"
|
- conditions:
|
||||||
- conditions:
|
- condition: state
|
||||||
- condition: state
|
entity_id: binary_sensor.upstairs_bathroom_motion
|
||||||
entity_id: binary_sensor.upstairs_bathroom_motion
|
state: 'on'
|
||||||
state: 'on'
|
sequence:
|
||||||
sequence:
|
- service: input_select.select_option
|
||||||
- service: input_select.select_option
|
target:
|
||||||
target:
|
entity_id: input_select.upstairs_bathroom_scenes
|
||||||
entity_id: input_select.upstairs_bathroom_scenes
|
data:
|
||||||
data:
|
option: Adaptive
|
||||||
option: Adaptive
|
- conditions:
|
||||||
- conditions:
|
- condition: template
|
||||||
- condition: template
|
value_template: "{{ is_state('binary_sensor.upstairs_bathroom_motion','off') and is_state('timer.upstairs_bathroom_motion_timer','active') }}"
|
||||||
value_template: "{{ is_state('binary_sensor.upstairs_bathroom_motion','off') and is_state('timer.upstairs_bathroom_motion_timer','active') }}"
|
sequence:
|
||||||
sequence:
|
- service: timer.finish
|
||||||
- service: timer.finish
|
target:
|
||||||
target:
|
entity_id: timer.upstairs_bathroom_motion_timer
|
||||||
entity_id: timer.upstairs_bathroom_motion_timer
|
default:
|
||||||
default:
|
- if:
|
||||||
- if:
|
- condition: state
|
||||||
- condition: state
|
entity_id: binary_sensor.early_night_mode
|
||||||
entity_id: binary_sensor.early_night_mode
|
state: 'on'
|
||||||
state: 'on'
|
then:
|
||||||
then:
|
- service: input_select.select_option
|
||||||
- service: input_select.select_option
|
target:
|
||||||
target:
|
entity_id: input_select.upstairs_bathroom_scenes
|
||||||
entity_id: input_select.upstairs_bathroom_scenes
|
data:
|
||||||
data:
|
option: Nightlight
|
||||||
option: Nightlight
|
else:
|
||||||
else:
|
- service: light.turn_off
|
||||||
- service: light.turn_off
|
target:
|
||||||
target:
|
entity_id: light.upstairs_bathroom_lights
|
||||||
entity_id: light.upstairs_bathroom_lights
|
- service: switch.turn_on
|
||||||
- service: switch.turn_on
|
target:
|
||||||
target:
|
entity_id: switch.adaptive_lighting_upstairs_bathroom
|
||||||
entity_id: switch.adaptive_lighting_upstairs_bathroom
|
- service: switch.turn_off
|
||||||
- service: switch.turn_off
|
target:
|
||||||
target:
|
entity_id: switch.adaptive_lighting_sleep_mode_upstairs_bathroom
|
||||||
entity_id: switch.adaptive_lighting_sleep_mode_upstairs_bathroom
|
- service: input_text.set_value
|
||||||
- service: input_text.set_value
|
target:
|
||||||
target:
|
entity_id: input_text.upstairs_bathroom_selected_scene
|
||||||
entity_id: input_text.upstairs_bathroom_selected_scene
|
data:
|
||||||
data:
|
value: Adaptive
|
||||||
value: Adaptive
|
|
||||||
|
|
||||||
bright_on_first_floor:
|
bright_on_first_floor:
|
||||||
alias: 'Bright on First Floor'
|
alias: 'Bright on First Floor'
|
||||||
@ -1089,7 +1088,16 @@ script:
|
|||||||
entity_id:
|
entity_id:
|
||||||
- light.hallway_overhead
|
- light.hallway_overhead
|
||||||
- light.master_bedroom_lights
|
- light.master_bedroom_lights
|
||||||
- light.upstairs_bathroom_lights
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.shower_mode
|
||||||
|
state: 'off'
|
||||||
|
then:
|
||||||
|
- service: input_select.select_option
|
||||||
|
target:
|
||||||
|
entity_id: input_select.upstairs_bathroom_scenes
|
||||||
|
data:
|
||||||
|
option: Bright
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.kallen_sleeping
|
entity_id: input_boolean.kallen_sleeping
|
||||||
@ -1112,10 +1120,19 @@ script:
|
|||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_select.upstairs_hallway_scenes
|
- input_select.upstairs_hallway_scenes
|
||||||
- input_select.upstairs_bathroom_scenes
|
|
||||||
- input_select.master_bedroom_scenes
|
- input_select.master_bedroom_scenes
|
||||||
data:
|
data:
|
||||||
option: Bright
|
option: Bright
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.shower_mode
|
||||||
|
state: 'off'
|
||||||
|
then:
|
||||||
|
- service: input_select.select_option
|
||||||
|
target:
|
||||||
|
entity_id: input_select.upstairs_bathroom_scenes
|
||||||
|
data:
|
||||||
|
option: Bright
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
@ -1282,18 +1299,23 @@ script:
|
|||||||
- input_select.upstairs_hallway_scenes
|
- input_select.upstairs_hallway_scenes
|
||||||
data:
|
data:
|
||||||
option: Nightlight
|
option: Nightlight
|
||||||
- service: input_select.select_option
|
- if:
|
||||||
target:
|
- condition: state
|
||||||
entity_id: input_select.upstairs_bathroom_scenes
|
entity_id: input_boolean.shower_mode
|
||||||
data:
|
state: 'off'
|
||||||
option: >
|
then:
|
||||||
{% if is_state('binary_sensor.upstairs_bathroom_motion','on') %}
|
- service: input_select.select_option
|
||||||
Adaptive
|
target:
|
||||||
{% elif is_state('timer.upstairs_bathroom_motion_timer','active') %}
|
entity_id: input_select.upstairs_bathroom_scenes
|
||||||
Adaptive
|
data:
|
||||||
{% else %}
|
option: >
|
||||||
Nightlight
|
{% if is_state('binary_sensor.upstairs_bathroom_motion','on') %}
|
||||||
{% endif %}
|
Adaptive
|
||||||
|
{% elif is_state('timer.upstairs_bathroom_motion_timer','active') %}
|
||||||
|
Adaptive
|
||||||
|
{% else %}
|
||||||
|
Nightlight
|
||||||
|
{% endif %}
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
target:
|
target:
|
||||||
area_id:
|
area_id:
|
||||||
@ -1334,18 +1356,23 @@ script:
|
|||||||
- kallen_bedroom
|
- kallen_bedroom
|
||||||
- emma_bedroom
|
- emma_bedroom
|
||||||
- upstairs_hallway
|
- upstairs_hallway
|
||||||
- service: input_select.select_option
|
- if:
|
||||||
target:
|
- condition: state
|
||||||
entity_id: input_select.upstairs_bathroom_scenes
|
entity_id: input_boolean.shower_mode
|
||||||
data:
|
state: 'off'
|
||||||
option: >
|
then:
|
||||||
{% if is_state('binary_sensor.upstairs_bathroom_motion','on') %}
|
- service: input_select.select_option
|
||||||
Adaptive
|
target:
|
||||||
{% elif is_state('timer.upstairs_bathroom_motion_timer','active') %}
|
entity_id: input_select.upstairs_bathroom_scenes
|
||||||
Adaptive
|
data:
|
||||||
{% else %}
|
option: >
|
||||||
Nightlight
|
{% if is_state('binary_sensor.upstairs_bathroom_motion','on') %}
|
||||||
{% endif %}
|
Adaptive
|
||||||
|
{% elif is_state('timer.upstairs_bathroom_motion_timer','active') %}
|
||||||
|
Adaptive
|
||||||
|
{% else %}
|
||||||
|
Nightlight
|
||||||
|
{% endif %}
|
||||||
- delay:
|
- delay:
|
||||||
seconds: 1
|
seconds: 1
|
||||||
- service: switch.turn_on
|
- service: switch.turn_on
|
||||||
|
Reference in New Issue
Block a user