Turn on lights when motion is detected
Automatically turning on lights when motion is detected is one of the most popular and useful smart home automations. It solves the everyday problem of fumbling for light switches in the dark and creates a seamless, effortless lighting experience.
Use cases
Indoor automation
- Nighttime navigation - Bathroom lights turn on at low brightness when you get up at night
- Home office - Lights automatically turn on when you enter your workspace
- Hallways - Lights turn on as you move through the house
- Closets - No more fumbling for switches in dark spaces
Outdoor Automation
- Garden Shed - Motion sensor triggers light when you enter
- Porch Light - Automatically lights up for guests and delivery drivers
Products needed
Essential Equipment
Motion Sensor
Popular brands: Philips Hue, Aqara, SmartThings, Wyze
Indoor: Standard motion sensors • Outdoor: Weatherproof IP65+ rated sensors
Indoor: Standard motion sensors • Outdoor: Weatherproof IP65+ rated sensors
Smart Light Switch or Bulb
Switches: Lutron, GE, Inovelli, Leviton
Bulbs: Philips Hue, LIFX, Wyze, Sengled
Bulbs: Philips Hue, LIFX, Wyze, Sengled
💡 Outdoor Motion Sensing Tip
- Use sensors specifically rated for outdoor use (IP65 or higher)
- OR protect indoor sensors with weatherproof enclosures
- OR place sensors under eaves to avoid direct water exposure
Basic automation setup
IF motion detected
THEN turn on lights to 100%
🌞 Day vs. Night Dimming Enhancement
- Daytime: Brightness 100% OR skip turning on if room has natural light (use lux sensor)
- Nighttime (9 PM - 11 PM): Medium brightness 50%
- Deep Night (11 PM - 6 AM): Low brightness 10-20% with warm color temperature
- Early Morning (6 AM - 9 AM): Full brightness 100%
Triggers
- Motion detected by sensor
Conditions
Time-based: Different behavior for day vs. nightLux sensor: Only activate if room is dark (below certain lux level)
Home mode: Only when home is occupied
Actions
- Turn on light switch or bulb
- Set to preferred brightness level (dimming percentage)
Platform-specific examples
Home Assistant
Trigger
Motion sensor state changes to "on"
Condition
Light level (lux) is below 100
Action
Turn on bathroom light
Night (10 PM - 6 AM): Set brightness to 10%
Day (6 AM - 10 PM): Set brightness to 100%
SmartThings
IF
Motion is detected on sensor
AND
Time is between 10 PM and 6 AM
THEN
Turn on light to 10%
Note: Create second routine for daytime with 100% brightness
Hubitat
Trigger
Motion sensor active
Condition
Mode is "Night" or time between 10 PM - 6 AM
Action
Set light to 10%
Setup: Use Rule Machine or Simple Automation Rules
Note: Create separate rule for daytime at 100%
Note: Create separate rule for daytime at 100%
Apple HomeKit
When
Motion sensor detects motion
Time
Between 10 PM and 6 AM
Do
Turn on bathroom light at 10%
Note: Repeat for daytime hours at 100%
Alexa
When
Motion sensor detects motion
Condition
Between 10 PM and 6 AM
Action
Turn on light to 10%
Note: Create second routine for daytime with 100% brightness
Google Home
When
Motion sensor detects motion
Condition
Time between 10 PM - 6 AM
Action
Set light to 10%
Note: Create second routine for daytime with 100% brightness
Advanced features
Multiple brightness levels
Create different levels throughout the night:
9 PM - 11 PM
30%
Still awake, need moderate light
11 PM - 5 AM
10%
Minimal disturbance
5 AM - 7 AM
20%
Gentle wake-up
7 AM - 9 PM
100%
Full brightness
Lux-based activation
Only turn on lights if the room is actually dark:
- Add a condition that light level must be below a certain threshold (e.g., 100 lux)
- This prevents lights from turning on during daytime when natural light is sufficient
Zone-based motion
For larger rooms, use multiple motion sensors to track which area someone is in and only light that zone.
Common issues and solutions
Lights turn on too slowly
Problem: Delay between motion detection and lights turning on causes you to reach for the switch.
Solutions:
- Check sensor placement - should detect motion before entering room
- Reduce automation processing time - use local control instead of cloud
- Use faster communication protocols (Zigbee/Z-Wave vs WiFi)
- Optimize automation logic to minimize conditions
Lights turn on when not needed
Problem: Lights activate from pets, sunlight reflections, or other false triggers.
Solutions:
- Adjust motion sensor sensitivity
- Add lux sensor condition to prevent daytime activation
- Use pet-immune motion sensors
- Position sensor away from windows and heat sources
- Add time-based conditions
Inconsistent performance
Problem: Sometimes works, sometimes doesn't.
Solutions:
- Check sensor battery levels
- Verify wireless signal strength (Zigbee/Z-Wave mesh)
- Replace batteries before completely dead
- Add repeaters/extenders for distant sensors
- Check for interference from other devices
Sensor placement best practices
Height
- Optimal: 6-8 feet high for best coverage
- Corners: Good for monitoring entire room
- Entry points: Near doors for immediate detection
Angle
- Ceiling mount: Wide coverage, detects all motion
- Wall mount: Directional, catches people entering
- Corner mount: 90° coverage, good for hallways
Coverage testing
- Mount sensor temporarily with tape
- Walk through room at different paths
- Verify all entry points are covered
- Check for dead zones
- Adjust position or add additional sensors
- Permanently mount once confirmed
What to avoid
- Near windows - Sunlight and outdoor motion cause false triggers
- Near heating/AC vents - Temperature changes trigger sensors
- Pointed at moving objects - Ceiling fans, curtains, pets
- Behind furniture - Blocks detection zone
Related automations: