Hi, I plan to use a script for a delay counter in order to keep a light on some time after movement.
Each movement trigger a PIR and its signal is handled into one automation task to call a script to delay the light off:
movement -> PIR -> Start delay counter -> Light off
The test code is:
[code]…
automation:
…
- alias: ‘test_start’
trigger:
platform: state
entity_id: switch.sw3
state: ‘on’
action:
service: script.turn_on
entity_id: script.test
…
script:
…
test:
alias: test_delay
sequence:
- delay:
minutes: 1
…[/code]
The first PIR signal call the delay script ok, but the second signal coming during the delay interval just switch off the script.
I think this behavior is not normal, because there is no script.turn_off , I expect it to start the delay script again.