Switch senes to parallel to avoid lag, probably
This commit is contained in:
parent
045e87fe73
commit
f5b49149e9
@ -137,16 +137,11 @@ action:
|
||||
name: "Motion On"
|
||||
message: "Motion was detected."
|
||||
|
||||
- alias: "Activate the ON scene"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_on
|
||||
- delay:
|
||||
seconds: 1
|
||||
- alias: "Activate the ON scene again, after a delay (to help laggy setups)"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_on
|
||||
- parallel:
|
||||
- alias: "Activate the ON scene"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_on
|
||||
|
||||
|
||||
# Take actions based on Motion being undetected
|
||||
@ -181,10 +176,11 @@ action:
|
||||
data:
|
||||
name: "Begin notice period"
|
||||
message: "Begin notice period; Waiting while motion is still off."
|
||||
- alias: "Activate Scene: Off Prep 1 (Notice)"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_off_prep_1
|
||||
- parallel:
|
||||
- alias: "Activate Scene: Off Prep 1 (Notice)"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_off_prep_1
|
||||
- alias: "Delay during the notice period"
|
||||
wait_template: "{{ states[motion_sensor].state == 'on' }}"
|
||||
timeout: "{{ notice_seconds }}"
|
||||
@ -193,10 +189,11 @@ action:
|
||||
entity_id: !input motion_sensor
|
||||
state: "on"
|
||||
then:
|
||||
- alias: "Activate Scene: On"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_on
|
||||
- parallel:
|
||||
- alias: "Activate Scene: On"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_on
|
||||
- alias: "Double countdown timer when user interrupts the notice period."
|
||||
service: input_number.set_value
|
||||
data:
|
||||
@ -213,10 +210,11 @@ action:
|
||||
data:
|
||||
name: "Begin warning period"
|
||||
message: "Begin warning period; Waiting while motion is still off."
|
||||
- alias: "Activate Scene: Off Prep 2 (Warning)"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_off_prep_2
|
||||
- parallel:
|
||||
- alias: "Activate Scene: Off Prep 2 (Warning)"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_off_prep_2
|
||||
- alias: "Delay during the warning period"
|
||||
wait_template: "{{ states[motion_sensor].state == 'on' }}"
|
||||
timeout: "{{ warning_seconds }}"
|
||||
@ -225,10 +223,11 @@ action:
|
||||
entity_id: !input motion_sensor
|
||||
state: "on"
|
||||
then:
|
||||
- alias: "Activate Scene: On"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_on
|
||||
- parallel:
|
||||
- alias: "Activate Scene: On"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_on
|
||||
- alias: "Double countdown timer when user interrupts the warning period."
|
||||
service: input_number.set_value
|
||||
data:
|
||||
@ -241,10 +240,11 @@ action:
|
||||
message: "Warning period has finished and motion is still off."
|
||||
|
||||
|
||||
- alias: "Activate Scene: Off (Done)"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_off
|
||||
- parallel:
|
||||
- alias: "Activate Scene: Off (Done)"
|
||||
service: scene.turn_on
|
||||
target:
|
||||
entity_id: !input scene_off
|
||||
|
||||
- alias: "Reset countdown timer after turning off lights."
|
||||
service: input_number.set_value
|
||||
|
Loading…
Reference in New Issue
Block a user