Trying to make an automation that turns on a light module, so that it stays on for 5 minutes after the last doorbell press. What I have now works kind of. The issue is that the light will turn off 5 minutes after the first doorbell press. If someone presses the doorbell within that 5 minutes, it doesn’t extend the time. Any suggestions? Thank you.
alias: Doorbell Light 5 minutes
description: ""
triggers:
- trigger: webhook
allowed_methods:
- POST
local_only: true
webhook_id: doorbell-zzzzzzzzzzzzzzzzz
conditions: []
actions:
- type: turn_on
device_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
entity_id: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
domain: switch
- delay:
hours: 0
minutes: 5
seconds: 0
- type: turn_off
device_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
entity_id: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
domain: switch
mode: single