WLED Motion Sensor Automation — How to Make Your Lights React to Movement

WLED Motion Sensor Automation — How to Make Your Lights React to Movement

If you have already set up a WLED controller, you know the basics — if not, start with our beginner's guide to WLED. Your phone controls your lights, you can change colours, switch effects, and create presets.

It feels clever for about a week.

Then the novelty wears off. Opening an app every time you walk into a room quickly becomes a chore.

What you actually want is for the lights to know you are there.

That is where motion sensors come in. Instead of reaching for your phone or a wall switch, the lights turn on automatically when you enter a room and switch off when you leave.

A simple WLED motion sensor setup can transform an LED strip from a decorative gadget into something that feels built into your home.

In this guide, we'll show you how to create motion-activated WLED lighting using Home Assistant and Zigbee sensors, explain when a PIR sensor is the right choice, and help you decide whether a presence sensor is worth the extra cost.

If you have not yet connected WLED to Home Assistant, start with our WLED and Home Assistant setup guide before continuing.


Two Ways to Add Motion Sensing to WLED

There are two common ways to create motion-triggered WLED lighting.

Best for: Most homeowners and smart home enthusiasts.

A Zigbee motion sensor reports movement to Home Assistant. Home Assistant then tells WLED what to do.

This approach is popular because:

  • One sensor can control multiple WLED controllers
  • Automations can depend on time of day
  • You can include additional conditions such as ambient light levels
  • Everything can run locally without cloud services
  • The same sensor can trigger lights, notifications, fans, heating, and other devices

For most installations, this is the easiest and most flexible option.

Method 2: PIR Sensor Connected Directly to WLED

Best for: Advanced users who want a completely standalone setup.

WLED supports PIR motion sensors through its Usermods system. This allows a sensor to connect directly to the controller without requiring Home Assistant.

The advantage is simplicity:

  • No Home Assistant required
  • No Zigbee coordinator required
  • No automation platform needed

The downside is flexibility. The sensor can only control that controller, and creating more advanced logic becomes difficult.

This approach may also require additional firmware configuration depending on your WLED build.

For most users, Home Assistant remains the recommended route.


What You Will Need

Item Notes
WLED controller Any WLED-compatible controller already connected to your network — see our controller selection guide
Home Assistant Installed and running
Zigbee coordinator USB Zigbee adapter connected to Home Assistant
Zigbee motion sensor PIR motion sensor for detecting movement
ZHA or Zigbee2MQTT Zigbee integration for Home Assistant

If you are starting from scratch, a basic WLED controller, Zigbee coordinator, and Zigbee PIR sensor are enough to create reliable motion-activated lighting.


Choosing the Right Motion Sensor

Before creating automations, it helps to understand the difference between PIR motion sensors and human presence sensors.

Many people use the terms interchangeably, but they solve different problems.

PIR Motion Sensors

PIR stands for Passive Infrared.

These sensors detect changes in infrared radiation caused by movement across their field of view.

They work exceptionally well in:

  • Hallways
  • Staircases
  • Entrances
  • Utility rooms
  • Landings

Advantages:

  • Low cost
  • Battery powered
  • Long battery life
  • Fast response times
  • Easy Zigbee integration

The main limitation is that PIR sensors detect movement, not occupancy.

If someone sits still at a desk, watches television, or reads a book, the sensor may eventually decide the room is empty.


Human Presence Sensors

Human presence sensors typically use mmWave radar technology.

Unlike PIR sensors, they can detect extremely small movements such as:

  • Breathing
  • Typing
  • Hand movements
  • Small posture changes

This allows them to keep lights on even when someone remains seated.

Presence sensors are particularly useful in:

  • Home offices
  • Living rooms
  • Workshops
  • Bedrooms

Some presence sensors use Zigbee, while others use Wi-Fi, ESPHome, Bluetooth, or proprietary protocols.

The trade-off is cost and complexity. Presence sensors are generally more expensive and often require additional configuration.


PIR vs Presence Sensors

Feature PIR Motion Sensor Presence Sensor
Detects movement Yes Yes
Detects stationary occupants No Yes
Battery powered options Common Less common
Cost Lower Higher
Setup complexity Simple Moderate
Best for hallways and stairs Excellent Usually unnecessary
Best for offices and living rooms Limited Excellent

UK Recommendation

Start with a Zigbee PIR sensor.

For hallways, stairs, landings, and entrances, a PIR sensor is usually all you need. They are inexpensive, reliable, and integrate easily with Home Assistant through ZHA or Zigbee2MQTT.

Once you become comfortable building automations, consider adding a presence sensor to rooms where people spend long periods sitting still.

For most homes, a PIR sensor delivers the best value.


WLED and Home Assistant Integration

WLED integrates directly with Home Assistant through its native integration.

No third-party plugins or cloud services are required.

Once connected, Home Assistant can:

  • Turn WLED lights on and off
  • Change brightness
  • Select presets
  • Adjust colours
  • Trigger effects
  • Synchronise multiple controllers

This makes Home Assistant motion lighting one of the most popular WLED automation projects.

Before creating automations, confirm that:

  • Your WLED controller appears in Home Assistant
  • You can manually switch the light on and off
  • Presets work correctly
  • The controller is connected reliably to your network

Testing this now avoids troubleshooting later.

Step 1 — Pair Your Motion Sensor

Before you can automate anything, your motion sensor needs to communicate with Home Assistant.

The exact process varies slightly depending on whether you use ZHA or Zigbee2MQTT, but the overall workflow is the same.

  1. Connect your Zigbee coordinator to the Home Assistant machine.
  2. Open Settings → Devices & Services.
  3. Configure either ZHA or Zigbee2MQTT.
  4. Put your motion sensor into pairing mode.
  5. Allow Home Assistant to discover the device.
  6. Give the sensor a descriptive name.

Good examples include:

  • Hallway Motion Sensor
  • Stair Motion Sensor
  • Landing Motion Sensor
  • Bathroom Motion Sensor

Once paired, the sensor will typically expose:

  • Motion detection
  • Battery level
  • Signal quality
  • Temperature (on some models)
  • Illuminance (on some models)

Before continuing, verify that motion events appear in Home Assistant when you walk in front of the sensor.


Step 2 — Create Your First Motion Automation

Now it is time to build your first WLED motion automation.

The goal is simple:

  1. Motion detected
  2. WLED turns on
  3. No motion for a period of time
  4. WLED turns off

Create the Automation

Navigate to:

Settings → Automations & Scenes

Create a new automation and give it a descriptive name.

Example:

Hallway Lights - Motion Triggered

Trigger

Configure the trigger using your motion sensor.

Entity:
binary_sensor.hallway_motion

From:
off

To:
on

This causes the automation to run immediately when movement is detected.


Optional Condition

A useful condition is checking whether the light is already on.

Light state = off

This prevents effects or presets from restarting every time someone moves.

Not every installation requires this, but it often improves the user experience.


Action

Call:

light.turn_on

Select your WLED light entity.

You can optionally define:

  • Brightness
  • Colour
  • Preset
  • Effect

Using presets is usually preferable to selecting effects directly because presets remain consistent between firmware updates and configuration changes.

Example:

Brightness:
80%

Preset:
Warm White Hallway

Turn the Lights Off

There are two common approaches.

Option 1: Fixed Delay

Motion detected
 Light ON
 Wait 2 minutes
 Light OFF

Simple and effective.

Option 2: Wait Until No Motion

Motion detected
 Light ON
 Wait until sensor reports no motion for 2 minutes
 Light OFF

This is usually the better option.

The timer automatically resets whenever new motion is detected.

If someone remains in the area, the light stays on.

When they leave, the countdown begins.


Automation Mode

Set the automation mode to:

Restart

This ensures every new motion event restarts the timer.

Without this setting, lights can occasionally switch off while someone is still present.


Real-World WLED Motion Automation Ideas

The best automations are usually the simplest ones.

Start with one location and expand from there.


Hallway Lighting

The hallway is often the first place people automate.

Most UK homes have a hallway connecting several rooms, making it one of the highest-traffic areas in the house.

A motion-activated LED strip removes the need to reach for a switch every time you walk through.

Example:

  • Motion detected
  • WLED strip turns on at 60%
  • Warm white preset activates
  • Three minutes of inactivity
  • Lights fade off

For late-night use, add a time condition.

Example:

11 PM  6 AM
Brightness = 10%

This provides enough light to navigate safely without waking everyone else.


Stair Lighting

Stairs are one of the most practical locations for WLED motion automation.

Instead of illuminating an entire landing or hallway, a subtle LED strip can provide enough light to move safely.

A common setup uses:

  • One sensor at the bottom
  • One sensor at the top
  • WLED strip under the handrail or skirting

Automation:

Either sensor detects motion
 Stair lights on
 No motion for 2 minutes
 Lights off

This means the lights are already active before you take your first step.


Bathroom Night Lighting

Nobody enjoys being blinded by bright lighting at 2 AM.

A small WLED strip can solve this problem.

Example setup:

Daytime:

Motion detected
 80% cool white

Night-time:

Motion detected
 5% warm white or amber

This provides enough visibility while remaining comfortable on sleepy eyes.

A simple time condition is all that is required.


Living Rooms and Home Offices

This is where sensor selection becomes important.

A PIR sensor may work perfectly in a hallway but struggle in a room where people remain seated.

If lights switch off while somebody is:

  • Working
  • Watching television
  • Reading
  • Gaming

a presence sensor may be a better choice.

Presence sensors can detect tiny movements and maintain occupancy status even when someone remains relatively still.

For offices and living spaces, the additional cost is often worthwhile.


Troubleshooting

The Automation Does Not Trigger

Start by checking the motion sensor.

Open:

Developer Tools → States

Watch the sensor state while moving in front of it.

If the state changes correctly:

  • Verify the automation trigger
  • Verify the entity selection
  • Check the automation trace

The automation trace usually reveals exactly where execution stopped.


Lights Turn Off Too Soon

This is one of the most common complaints.

Possible causes include:

  • Timer too short
  • PIR sensor cannot detect stationary occupants
  • Automation mode not set to Restart

Try increasing the timeout period first.

If the problem occurs in a room where people sit still, consider a presence sensor.


Motion Sensor Responds Slowly

Most Zigbee PIR sensors react quickly to initial movement.

However, many models include a retrigger interval ranging from a few seconds to over a minute.

This behaviour varies by manufacturer.

If responsiveness is important, look for sensors with adjustable retrigger settings.


Battery Life Is Poor

Most Zigbee PIR sensors should achieve between one and two years of battery life.

If batteries are draining unusually fast, check:

  • Zigbee signal quality
  • Reporting frequency
  • Sensor placement
  • Network stability

Poor Zigbee coverage can significantly reduce battery life because devices repeatedly attempt to reconnect.


Frequently Asked Questions

Can I Use a Motion Sensor With WLED Without Home Assistant?

Yes.

WLED supports directly connected PIR sensors through Usermods.

This creates a standalone solution without Home Assistant.

However, Home Assistant provides significantly more flexibility and is the recommended option for most installations.


Does This Work Without the Internet?

Yes.

WLED, Home Assistant, Zigbee2MQTT, ZHA, and most Zigbee devices can operate entirely on your local network.

Internet access is not required for day-to-day operation.


Can One Motion Sensor Control Multiple WLED Controllers?

Yes.

This is one of the biggest advantages of using Home Assistant.

A single motion sensor can trigger:

  • Multiple WLED controllers
  • Smart plugs
  • Notifications
  • Other lights
  • Heating or ventilation systems

from the same automation.


Should I Choose a PIR Sensor or a Presence Sensor?

For most homes:

Choose a PIR sensor if:

  • The area is a hallway
  • The area is a staircase
  • The area is an entrance
  • You want the lowest-cost solution

Choose a presence sensor if:

  • People remain seated for long periods
  • The room is an office
  • The room is a living room
  • You frequently experience lights turning off while occupied

The Takeaway

A WLED strip behind a television looks impressive.

A WLED strip that automatically reacts when you walk into a room feels genuinely useful.

Motion-triggered lighting is one of the simplest and most rewarding WLED projects because it improves everyday life immediately.

Start with a single hallway automation.

Live with it for a week.

Once you experience lights turning on automatically exactly when you need them, you will quickly start finding opportunities to automate other rooms.

For most UK homes, the winning combination is simple:

  • WLED controller
  • Home Assistant
  • Zigbee coordinator
  • Zigbee PIR sensor

It runs locally, avoids cloud subscriptions, scales easily, and provides a solid foundation for future smart home projects.

Ready to build your first WLED motion sensor setup? Browse our range of WLED controllers and compatible smart home accessories to get started.

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.