Bugfixes for living room alert
This commit is contained in:
@ -224,7 +224,7 @@ script:
|
|||||||
# If current scene is a defined scene, take note of it
|
# If current scene is a defined scene, take note of it
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('input_text.living_room_selected_scene') in state_attr('input_select.basement_studio_scenes','options') }}"
|
value_template: "{{ states('input_text.living_room_selected_scene') in state_attr('input_select.living_room_studio_scenes','options') }}"
|
||||||
then:
|
then:
|
||||||
- service: input_text.set_value
|
- service: input_text.set_value
|
||||||
target:
|
target:
|
||||||
@ -234,7 +234,7 @@ script:
|
|||||||
# If the lights are on, and another alert isn't being interrupted, create a backup scene to restore at the end
|
# If the lights are on, and another alert isn't being interrupted, create a backup scene to restore at the end
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ lightState == 'on' and currentScene != 'Alert' }}"
|
value_template: "{{ lightState == 'on' and states('input_text.living_room_selected_scene') != 'Alert' }}"
|
||||||
then:
|
then:
|
||||||
- service: scene.create
|
- service: scene.create
|
||||||
data:
|
data:
|
||||||
@ -244,12 +244,12 @@ script:
|
|||||||
- light.living_room_overhead
|
- light.living_room_overhead
|
||||||
- service: input_text.set_value
|
- service: input_text.set_value
|
||||||
target:
|
target:
|
||||||
entity_id: input_text.basement_studio_selected_scene
|
entity_id: input_text.living_room_studio_selected_scene
|
||||||
data:
|
data:
|
||||||
value: Alert
|
value: Alert
|
||||||
# Define variable for restoration of the current scene if the backup is not needed
|
# Define variable for restoration of the current scene if the backup is not needed
|
||||||
- variables:
|
- variables:
|
||||||
restoreScene: "{{ states('input_text.basement_lights_restore') }}"
|
restoreScene: "{{ states('input_text.living_room_lights_restore') }}"
|
||||||
# Actual alert begins
|
# Actual alert begins
|
||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
target:
|
target:
|
||||||
|
Reference in New Issue
Block a user