From 1771b154e089d2677468c85cbb467587581e9f5b Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 27 Dec 2023 22:07:21 -0800 Subject: [PATCH] Scene repeating: Make a little zipper via 500ms instead of 1s retries. --- mikes-motion-activated-scenes.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mikes-motion-activated-scenes.yaml b/mikes-motion-activated-scenes.yaml index 9147191..efb2627 100644 --- a/mikes-motion-activated-scenes.yaml +++ b/mikes-motion-activated-scenes.yaml @@ -125,7 +125,7 @@ blueprint: scene_repeat_count: name: "Scene repeat/retry count" description: > - Whenever activating a scene, try this many times at 1-second intervals. + When activating a scene, try this many times in a row. This is sometimes useful when the network seems buggy or laggy, or for certain lights that fail to correctly apply brightness/color when first turning on. @@ -345,7 +345,7 @@ action: target: entity_id: !input scene_on - delay: - seconds: 1 + milliseconds: 500 - stop: "" # In OFF mode, just activate the OFF scene @@ -361,7 +361,7 @@ action: target: entity_id: !input scene_off - delay: - seconds: 1 + milliseconds: 500 - stop: "" # In notice mode, just activate the NOTICE scene @@ -377,7 +377,7 @@ action: target: entity_id: !input scene_notice - delay: - seconds: 1 + milliseconds: 500 - stop: "" # In warning mode, just activate the WARNING scene @@ -393,7 +393,7 @@ action: target: entity_id: !input scene_warning - delay: - seconds: 1 + milliseconds: 500 - stop: "" # Don't do anything after processing the enabled_helper triggers @@ -440,7 +440,7 @@ action: target: entity_id: !input scene_on - delay: - seconds: 1 + milliseconds: 500 # Motion is not detected @@ -508,7 +508,7 @@ action: target: entity_id: !input scene_notice - delay: - seconds: 1 + milliseconds: 500 - alias: "Delay during the notice period" wait_template: "{{ states[motion_sensor].state == 'on' or (enabled_helper != None and is_state('enabled_helper', 'off') ) }}" @@ -596,7 +596,7 @@ action: target: entity_id: !input scene_warning - delay: - seconds: 1 + milliseconds: 500 - alias: "Delay during the warning period" wait_template: "{{ states[motion_sensor].state == 'on' or (enabled_helper != None and is_state('enabled_helper', 'off') ) }}" @@ -625,7 +625,7 @@ action: target: entity_id: !input scene_on - delay: - seconds: 1 + milliseconds: 500 - alias: "Double countdown timer when user interrupts the warning period." service: input_number.set_value @@ -711,7 +711,7 @@ action: target: entity_id: !input scene_off - delay: - seconds: 1 + milliseconds: 500 - alias: "Reset countdown timer after turning off lights." service: input_number.set_value