Removing parallel scenes because they didn't help anything

This commit is contained in:
mike 2023-12-27 20:59:20 -08:00
parent 2cab185ac6
commit 467fcd30e3

View File

@ -327,17 +327,15 @@ action:
entity_id: !input motion_sensor entity_id: !input motion_sensor
state: "on" state: "on"
then: then:
- parallel: - alias: "Activate the ON scene"
- alias: "Activate the ON scene" service: scene.turn_on
service: scene.turn_on target:
target: entity_id: !input scene_on
entity_id: !input scene_on
else: else:
- parallel: - alias: "Activate the OFF scene"
- alias: "Activate the OFF scene" service: scene.turn_on
service: scene.turn_on target:
target: entity_id: !input scene_off
entity_id: !input scene_off
- stop: "" - stop: ""
# In ON mode, just activate the ON scene # In ON mode, just activate the ON scene
@ -346,10 +344,9 @@ action:
- condition: template - condition: template
value_template: "{{ disabled_scene == 'on' }}" value_template: "{{ disabled_scene == 'on' }}"
then: then:
- parallel: - service: scene.turn_on
- service: scene.turn_on target:
target: entity_id: !input scene_on
entity_id: !input scene_on
- stop: "" - stop: ""
# In OFF mode, just activate the OF scene # In OFF mode, just activate the OF scene
@ -358,10 +355,9 @@ action:
- condition: template - condition: template
value_template: "{{ disabled_scene == 'off' }}" value_template: "{{ disabled_scene == 'off' }}"
then: then:
- parallel: - service: scene.turn_on
- service: scene.turn_on target:
target: entity_id: !input scene_off
entity_id: !input scene_off
- stop: "" - stop: ""
# In notice mode, just activate the NOTICE scene # In notice mode, just activate the NOTICE scene
@ -370,10 +366,9 @@ action:
- condition: template - condition: template
value_template: "{{ disabled_scene == 'notice' }}" value_template: "{{ disabled_scene == 'notice' }}"
then: then:
- parallel: - service: scene.turn_on
- service: scene.turn_on target:
target: entity_id: !input scene_notice
entity_id: !input scene_notice
- stop: "" - stop: ""
# In warning mode, just activate the WARNING scene # In warning mode, just activate the WARNING scene
@ -382,10 +377,9 @@ action:
- condition: template - condition: template
value_template: "{{ disabled_scene == 'warning' }}" value_template: "{{ disabled_scene == 'warning' }}"
then: then:
- parallel: - service: scene.turn_on
- service: scene.turn_on target:
target: entity_id: !input scene_warning
entity_id: !input scene_warning
- stop: "" - stop: ""
# Don't do anything after processing the enabled_helper triggers # Don't do anything after processing the enabled_helper triggers
@ -423,11 +417,10 @@ action:
name: "Motion On" name: "Motion On"
message: "Motion was detected." message: "Motion was detected."
- parallel: - alias: "Activate the ON scene"
- alias: "Activate the ON scene" service: scene.turn_on
service: scene.turn_on target:
target: entity_id: !input scene_on
entity_id: !input scene_on
# Motion is not detected # Motion is not detected
@ -486,11 +479,12 @@ action:
data: data:
name: "Begin notice period" name: "Begin notice period"
message: "Begin notice period; Waiting while motion is still off." message: "Begin notice period; Waiting while motion is still off."
- parallel:
- alias: "Activate Scene: Notice" - alias: "Activate Scene: Notice"
service: scene.turn_on service: scene.turn_on
target: target:
entity_id: !input scene_notice entity_id: !input scene_notice
- alias: "Delay during the notice period" - alias: "Delay during the notice period"
wait_template: "{{ states[motion_sensor].state == 'on' or (enabled_helper != None and is_state('enabled_helper', 'off') ) }}" wait_template: "{{ states[motion_sensor].state == 'on' or (enabled_helper != None and is_state('enabled_helper', 'off') ) }}"
timeout: "{{ notice_seconds }}" timeout: "{{ notice_seconds }}"
@ -510,11 +504,12 @@ action:
entity_id: !input motion_sensor entity_id: !input motion_sensor
state: "on" state: "on"
then: then:
- parallel:
- alias: "Activate Scene: On" - alias: "Activate Scene: On"
service: scene.turn_on service: scene.turn_on
target: target:
entity_id: !input scene_on entity_id: !input scene_on
- alias: "Increase countdown timer when user interrupts the notice period." - alias: "Increase countdown timer when user interrupts the notice period."
service: input_number.set_value service: input_number.set_value
data: data:
@ -567,11 +562,12 @@ action:
data: data:
name: "Begin warning period" name: "Begin warning period"
message: "Begin warning period; Waiting while motion is still off." message: "Begin warning period; Waiting while motion is still off."
- parallel:
- alias: "Activate Scene: Warning" - alias: "Activate Scene: Warning"
service: scene.turn_on service: scene.turn_on
target: target:
entity_id: !input scene_warning entity_id: !input scene_warning
- alias: "Delay during the warning period" - alias: "Delay during the warning period"
wait_template: "{{ states[motion_sensor].state == 'on' or (enabled_helper != None and is_state('enabled_helper', 'off') ) }}" wait_template: "{{ states[motion_sensor].state == 'on' or (enabled_helper != None and is_state('enabled_helper', 'off') ) }}"
timeout: "{{ warning_seconds }}" timeout: "{{ warning_seconds }}"
@ -593,16 +589,18 @@ action:
entity_id: !input motion_sensor entity_id: !input motion_sensor
state: "on" state: "on"
then: then:
- parallel:
- alias: "Activate Scene: On" - alias: "Activate Scene: On"
service: scene.turn_on service: scene.turn_on
target: target:
entity_id: !input scene_on entity_id: !input scene_on
- alias: "Double countdown timer when user interrupts the warning period." - alias: "Double countdown timer when user interrupts the warning period."
service: input_number.set_value service: input_number.set_value
data: data:
entity_id: !input delay_seconds_helper entity_id: !input delay_seconds_helper
value: "{{ states[delay_seconds_helper].state | int * delay_seconds_multiplier }}" value: "{{ states[delay_seconds_helper].state | int * delay_seconds_multiplier }}"
- alias: "Limit delay seconds to its defined maximum" - alias: "Limit delay seconds to its defined maximum"
if: if:
- condition: template - condition: template
@ -620,6 +618,7 @@ action:
data: data:
name: "Limiting delay seconds" name: "Limiting delay seconds"
message: "Delay limited to max: {{ states[delay_seconds_helper].state }}" message: "Delay limited to max: {{ states[delay_seconds_helper].state }}"
- alias: "Log new delay seconds" - alias: "Log new delay seconds"
if: if:
- condition: template - condition: template
@ -672,11 +671,10 @@ action:
name: "Won't run on-before-off" name: "Won't run on-before-off"
message: "Won't run on-before-off because seconds was less than 1" message: "Won't run on-before-off because seconds was less than 1"
- parallel: - alias: "Activate Scene: Off (Done)"
- alias: "Activate Scene: Off (Done)" service: scene.turn_on
service: scene.turn_on target:
target: entity_id: !input scene_off
entity_id: !input scene_off
- alias: "Reset countdown timer after turning off lights." - alias: "Reset countdown timer after turning off lights."
service: input_number.set_value service: input_number.set_value