Smart Home Automation Success Story: Motion Sensors and Delayed Turn Off

I wanted to share my experience with setting up motion sensors in my home to automate the lighting system. I have a motion sensor in my office and one in the staircase. The goal was to have the lights turn on when I enter the office and turn off when I leave towards the staircase. However, I wanted to add a delay to prevent the lights from turning off immediately if I only step out for a short moment, like grabbing something from another room.

Initially, I set up a simple automation where the lights turn on when the office motion sensor detects movement. Then, when the staircase motion sensor is triggered, the lights turn off after a 2-minute delay. This worked well, but I noticed an issue: if I returned to the office within those 2 minutes, the lights would still turn off after the delay, which wasn’t ideal.

To solve this, I modified the automation to cancel the delayed turn-off if the office motion sensor detects movement again within the 2-minute window. This way, the lights stay on as long as I’m actively in the office, and only turn off after I’ve left for good. Here’s how I set it up:

  1. Trigger 1: Office motion sensor detects motion (turns lights on).
  2. Trigger 2: Staircase motion sensor detects motion (starts 2-minute delay before turning lights off).
  3. Condition: If the office motion sensor detects motion again within the 2-minute window, cancel the turn-off sequence.

This adjustment has made a significant difference in my daily routine, especially during late-night work sessions or quick trips to grab something. It’s amazing how a little tweak can make such a big impact on convenience!

I’d love to hear how others have optimized their motion sensor automations or any tips for improving this setup further. Happy automating! :rocket: