Turn lights off after motion stops
Leave the room, lights off. Stay still, and they should not leave you in the dark. The wall switch still wins when someone wants a different answer.
Best for: Hallways, closets, laundry rooms, and other spaces with predictable short visits.
Not for: A bathroom with a short PIR timer, or a home office where someone sits still for long periods. A PIR detects movement, not a person sitting still. Start with a longer delay, or follow the PIR vs mmWave presence article.
Why this exists
The off half makes automatic lighting useful without making it hostile. It should wait long enough for real people, then turn the light off after the room is clear. It must not fight a guest who used the familiar wall switch.
Use cases
Quick Access Spaces
- Bathroom - Turn off lights 5 minutes after no motion detected
- Closets - Turn off immediately after 1 minute (quick access areas)
- Garage - Turn off after 3-5 minutes of no activity
Living & Work Spaces
- Living Areas - Turn off lights 2 minutes after no motion at nighttime
- Home Office - Longer delay (10 minutes) for stationary work
What I used
| Job | Good enough | Never think about it | Notes |
|---|---|---|---|
| Detect fast entry motion | Shelly BLU Motion ZB | Aeotec SmartThings Motion Sensor - my favorite for fast reactions | A PIR needs a conservative timer for people who sit still. |
| Dim a fixed light | TP-Link Tapo S505D Matter Smart Dimmer Switch | UltraPro Z-Wave Long Range Dimmer | Verify hub compatibility. Keep the physical paddle usable. |
| Switch a fixed light on or off | Leviton DG15S Zigbee switch | UltraPro Z-Wave Long Range On/Off Switch | Keep the physical paddle usable. |
For a bathroom that needs humidity, temperature, and light readings too, use the Zooz ZSE11 800LR Q Sensor instead. It is not my first choice when the fastest motion response is the job.
See recommended gear for the job-first checklist. Product links on this page are direct, non-affiliate Amazon links. Product recommendations and any future affiliate relationships are explained in the disclosure.
- Use weather-rated sensors (IP65+) or protect from elements
Logic
- Trigger: The room sensor reports no motion for the chosen timeout.
- Conditions: The light was turned on by this automation, no other room sensor is active, and no manual override is active.
- Action: Turn the light off.
- Wait / timeout: Start at 5 to 10 minutes for a bathroom or quiet room. Reduce only after normal household testing.
- Stop condition: New motion, another active sensor, or a manual wall-switch change cancels the shutoff.
- Manual override: The wall switch still wins.
Setup notes
Start with a longer delay than you expect to need, then shorten it only after normal household use.
- Quick access spaces: One to two minutes can work for a closet or hallway.
- Living spaces: Start at three to five minutes.
- Bathrooms and quiet spaces: Start at 10 minutes, or use a contact sensor, another motion sensor, or mmWave presence sensing before reducing the delay.
Advanced features
Day vs. night timing
Create separate automations with different delay times:
- Daytime: Shorter delays (2-3 minutes), more active movement
- Nighttime: Longer delays (5-10 minutes), slower movement
Multiple sensor logic
For larger rooms, use multiple sensors to ensure no one is present:
- All motion sensors must show "no motion" before turning off
- Set appropriate delay (e.g., 5 minutes)
- Prevents false shutoffs in sensor blind spots
Activity-based override
Don't turn off lights if other activity detected:
- TV is on in the room
- Music is playing
- Computer is active
- Smart plug shows power usage
Common issues and solutions
Lights turn off while room is occupied
- Add door sensor - don't turn off if door closed
- Use longer delay (5-10 minutes instead of 2-3)
- Add additional motion sensors for full coverage
- Use occupancy sensors instead of motion
- Add manual override button to extend time
Lights stay on too long after leaving
- Reduce delay time
- Reposition sensor to focus on room interior only
- Add door sensor - turn off immediately when door closes
- Use presence detection for faster response
Inconsistent behavior
- Replace batteries before fully depleted
- Add Zigbee/Z-Wave repeaters
- Check sensor configuration
- Update firmware
- Test sensor range and coverage
Best practices
Testing your delays
- Start conservative: 10 minute delay initially
- Monitor: Watch for false shutoffs over several days
- Gradually reduce: Find the sweet spot
- Room-specific: Different delay per room type
Sensor coverage verification
- Walk through room at different paths
- Stand still in each area for 2 minutes
- Verify motion sensor still "sees" you
- Add sensors to eliminate dead zones
Manual override options
Always provide a way to override automation:
- Physical switch: Manual operation keeps lights on indefinitely
- Voice command: "Keep bathroom lights on" for 30 min override
- Dashboard button: Toggle to disable/enable automation
Energy savings
While LED bulbs use minimal power, automatic shutoff still provides benefits:
- 10W LED × 2 hours/day = 7.3 kWh/year per bulb
- Halogen/incandescent: 60W bulbs save 10x more
- Commercial spaces: significant savings
- Environmental impact: reduced energy generation
Failure modes
- The light turns off while someone is still: Increase the timeout before changing anything else. A PIR does not see a person working quietly, reading, showering, or standing behind a towel. For those rooms, follow the PIR vs mmWave presence article.
- A guest uses the wall switch: Treat that as an override. Do not let the next sensor event immediately undo it.
- The sensor sees motion outside the room: Reposition it or narrow its view before shortening the timeout.
- The hub reboots or the internet is down: The wall switch remains the fallback. A local automation may resume after the hub is ready, but do not rely on it for Level 1 control.
- The room is in use at night: Use a longer timeout for quiet nighttime use, especially in bathrooms.
Done when
- Leave the room and confirm the light turns off after the selected delay.
- Sit or stand still in every normal part of the room for the same delay and confirm it does not turn off unexpectedly.
- Toggle the wall switch manually and verify the automation does not fight the choice.
- Test after a hub restart and, where local control is expected, with the internet disconnected.
- Have a guest use the room without explaining the automation.
FAQ
How long should motion lights stay on?
Start longer than you think, then reduce the timeout only after the household has used the room normally for several days.
Why do bathroom motion lights turn off while someone is inside?
A PIR sensor can miss someone who is still or behind a shower curtain. Use a longer timeout, another sensor, or presence detection.
Can a wall switch override the automatic shutoff?
It should. Treat a manual change as an explicit choice and avoid turning the light back off immediately.