I currently use the Ring provided binary sensor to turn on a light during motion detection, and then back off 5 minutes after it clears. This has worked well but the binary sensor is being deprecated
triggers:
- trigger: state
entity_id:
- binary_sensor.front_door_motion
from: null
to: "on"
I tried to recreate the binary sensor as a template, however I found this only updates once a minute:
{{ now() - states('sensor.front_door_last_motion') | as_datetime < timedelta(minutes=3) }}
Is there a better way to achieve this, either in the automation trigger or the helper template?