this post was submitted on 27 Jan 2024
14 points (88.9% liked)
homeassistant
12102 readers
19 users here now
Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I have something like this setup for my porch lights. Light goes on when it detects motion, then it uses wait_for_trigger to wait until the motion stops before starting a 20 second and turning off the lights.
All simple enough so far but, crucially, the "mode" for the automation is set to restart. That way if the sensor detects motion during the 20 second countdown it cancels the whole run and starts again from the top.