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"
|
name: "Motion On"
|
||||||
message: "Motion was detected."
|
message: "Motion was detected."
|
||||||
|
|
||||||
- alias: "Activate the ON scene"
|
- parallel:
|
||||||
service: scene.turn_on
|
- alias: "Activate the ON scene"
|
||||||
target:
|
service: scene.turn_on
|
||||||
entity_id: !input scene_on
|
target:
|
||||||
- delay:
|
entity_id: !input scene_on
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
# Take actions based on Motion being undetected
|
# Take actions based on Motion being undetected
|
||||||
@ -181,10 +176,11 @@ 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."
|
||||||
- alias: "Activate Scene: Off Prep 1 (Notice)"
|
- parallel:
|
||||||
service: scene.turn_on
|
- alias: "Activate Scene: Off Prep 1 (Notice)"
|
||||||
target:
|
service: scene.turn_on
|
||||||
entity_id: !input scene_off_prep_1
|
target:
|
||||||
|
entity_id: !input scene_off_prep_1
|
||||||
- alias: "Delay during the notice period"
|
- alias: "Delay during the notice period"
|
||||||
wait_template: "{{ states[motion_sensor].state == 'on' }}"
|
wait_template: "{{ states[motion_sensor].state == 'on' }}"
|
||||||
timeout: "{{ notice_seconds }}"
|
timeout: "{{ notice_seconds }}"
|
||||||
@ -193,10 +189,11 @@ action:
|
|||||||
entity_id: !input motion_sensor
|
entity_id: !input motion_sensor
|
||||||
state: "on"
|
state: "on"
|
||||||
then:
|
then:
|
||||||
- alias: "Activate Scene: On"
|
- parallel:
|
||||||
service: scene.turn_on
|
- alias: "Activate Scene: On"
|
||||||
target:
|
service: scene.turn_on
|
||||||
entity_id: !input scene_on
|
target:
|
||||||
|
entity_id: !input scene_on
|
||||||
- alias: "Double countdown timer when user interrupts the notice period."
|
- alias: "Double countdown timer when user interrupts the notice period."
|
||||||
service: input_number.set_value
|
service: input_number.set_value
|
||||||
data:
|
data:
|
||||||
@ -213,10 +210,11 @@ 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."
|
||||||
- alias: "Activate Scene: Off Prep 2 (Warning)"
|
- parallel:
|
||||||
service: scene.turn_on
|
- alias: "Activate Scene: Off Prep 2 (Warning)"
|
||||||
target:
|
service: scene.turn_on
|
||||||
entity_id: !input scene_off_prep_2
|
target:
|
||||||
|
entity_id: !input scene_off_prep_2
|
||||||
- alias: "Delay during the warning period"
|
- alias: "Delay during the warning period"
|
||||||
wait_template: "{{ states[motion_sensor].state == 'on' }}"
|
wait_template: "{{ states[motion_sensor].state == 'on' }}"
|
||||||
timeout: "{{ warning_seconds }}"
|
timeout: "{{ warning_seconds }}"
|
||||||
@ -225,10 +223,11 @@ action:
|
|||||||
entity_id: !input motion_sensor
|
entity_id: !input motion_sensor
|
||||||
state: "on"
|
state: "on"
|
||||||
then:
|
then:
|
||||||
- alias: "Activate Scene: On"
|
- parallel:
|
||||||
service: scene.turn_on
|
- alias: "Activate Scene: On"
|
||||||
target:
|
service: scene.turn_on
|
||||||
entity_id: !input scene_on
|
target:
|
||||||
|
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:
|
||||||
@ -241,10 +240,11 @@ action:
|
|||||||
message: "Warning period has finished and motion is still off."
|
message: "Warning period has finished and motion is still off."
|
||||||
|
|
||||||
|
|
||||||
- alias: "Activate Scene: Off (Done)"
|
- parallel:
|
||||||
service: scene.turn_on
|
- alias: "Activate Scene: Off (Done)"
|
||||||
target:
|
service: scene.turn_on
|
||||||
entity_id: !input scene_off
|
target:
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user