When enabled helper goes OFF, reset the countdown timer

This commit is contained in:
mike 2024-01-02 01:58:22 -08:00
parent 610acdc1c4
commit 76d8721a7c

View File

@ -128,7 +128,7 @@ blueprint:
When activating a scene, try this many times in a row. When activating a scene, try this many times in a row.
This is sometimes useful when the network seems buggy or laggy, 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. or for certain lights that fail to correctly apply brightness/color when first turning on.
default: 1 default: 1
selector: selector:
number: number:
@ -309,6 +309,14 @@ action:
name: "Debug: Disabled scene" name: "Debug: Disabled scene"
message: "Disabled scene is currently set to: {{ disabled_scene }}" message: "Disabled scene is currently set to: {{ disabled_scene }}"
# If the enabled helper is OFF, we should start by resetting
# the countdown timer to default
- alias: "Reset countdown timer when enabled helper is switched OFF."
service: input_number.set_value
data:
entity_id: !input delay_seconds_helper
value: "{{ delay_seconds_default }}"
# In "auto" mode, activate the ON or OFF scene based on whether motion is currently detected # In "auto" mode, activate the ON or OFF scene based on whether motion is currently detected
# Also use "auto" mode if motion activation is ENABLED. # Also use "auto" mode if motion activation is ENABLED.
- alias: "auto mode: Activate ON scene, if motion is currently detected, otherwise activate the OFF scene" - alias: "auto mode: Activate ON scene, if motion is currently detected, otherwise activate the OFF scene"