mmWave Staircase Presence Detection with ESPHome (Room-Level)
Why Staircases Break Normal Presence Sensors
Staircases are one of the hardest spots in any smart home to automate correctly. mmWave sensors running on ESPHome can finally crack this problem, but only if you get the zones, timing, and mounting right. Below is a setup I’ve tested repeatedly for room-level presence detection on stairs, including the exact mistakes that cause flickering lights, false triggers bleeding in from nearby rooms, and gaps where the sensor just stops seeing someone halfway up.
Standard PIR motion sensors fail here for a few reasons:
- They need actual movement to fire. Stand still on a landing for ten seconds and the light shuts off under your feet.
- Stairwells are narrow and vertical. A PIR’s detection cone doesn’t care about your floor plan, so it spills into the hallway above or the room below and triggers for no reason.
- Glass railings, painted drywall, anything reflective, scatters infrared readings in ways that are basically impossible to predict.
mmWave radar sensors like the LD2410, LD2450, and HLK-2450 fix the “standing still” issue because they pick up micro-movements, breathing, shifting weight, instead of needing someone to actually walk. The catch on stairs: their wide detection cones become a liability unless you actively shape the zone yourself.
Hardware Choices That Actually Work
For stair applications, zone-capable sensors beat basic presence-only modules every time:
- LD2450 - tracks up to 3 targets with X/Y coordinates, so you can draw a software “fence” matching the actual stair footprint instead of settling for a generic cone.
- LD2410C - cheaper, single-zone gate distances (near/mid/far). Fine for short, straight staircases.
- HLK-LD2412 - a better sensitivity curve, worth it for long runs with landings.
Mount it at the top of the stairwell, angled down around 30-45°, not at the bottom looking up. This one change alone cuts down false triggers from the hallway below and keeps the detection volume contained to the stairs.
ESPHome Configuration: Zone Fencing
With the LD2450, the real trick is defining exclusion and detection zones in ESPHome rather than trusting the raw presence output:
ld2450: id: my_ld2450
binary_sensor:
- platform: ld2450 target_1: moving_target: Stair Target 1 presence_target: Stair Presence 1
number:
- platform: ld2450 zone_1_x1: name: “Stair Zone X1” zone_1_y1: name: “Stair Zone Y1” zone_1_x2: name: “Stair Zone X2” zone_1_y2: name: “Stair Zone Y2”
Open the ESPHome web dashboard’s live coordinate view (expose target_x and target_y as sensors) and physically walk the stairs while watching the numbers move. Note the min/max X/Y at the top step, the mid-landing, and the bottom step. Then set your zone boundaries a bit wider than that range, maybe 10-15cm of margin. Skip this and you’ll find the sensor “loses” anyone who pauses on the landing to check their phone.
Fixing Common False Triggers
- Pets setting off the lights: if your firmware supports a minimum target size or height filter, use it. Otherwise add a
delayed_offof 3-5 seconds and gate by distance (ignore anything under 0.5m from the sensor), which takes care of cats and small dogs loitering on the lower steps. - Bleed-through from the room next door: mmWave sensors have side and rear lobe sensitivity that zone fencing alone won’t kill. A cheap 3D-printed or foam collar around the back and sides of the sensor physically blocks it, and it works better than you’d expect.
- Flicker when tracking multiple targets: don’t act on raw per-target signals. Debounce the combined presence binary sensor template instead, with something like
filters: - delayed_off: 4s.
Combining Two Sensors for Full-Stair Coverage
Anything longer than roughly 4 meters is a problem for a single sensor. Most are rated for 6m, but reliable presence detection tends to cap out closer to 4m. For a long staircase, put one sensor at the top and one at the bottom, then merge them in ESPHome with a template binary sensor:
binary_sensor:
- platform: template name: “Staircase Occupied” lambda: |- return id(top_presence).state || id(bottom_presence).state;
Now Home Assistant sees one clean “Staircase Occupied” entity to drive lighting automations, instead of you juggling two separate sensor states in every automation you write.
Automation Tips for Home Assistant
- Turn lights on the instant
Staircase Occupiedgoes true. No delay needed. - Turn lights off only after it’s been false for 30-60 seconds. People pause mid-staircase more often than you’d think, tying a shoelace, answering a text, whatever.
- Use
target_distanceortarget_x/target_yfor directional logic. For example, only brighten the top-floor light when motion shows up in the upper zone, leave the bottom floor alone.
Conclusion
Getting staircase presence detection right isn’t about chasing the “best” mmWave sensor on the market. It comes down to zone fencing, mounting at the right angle, and pairing two units for longer runs. ESPHome’s native LD2450/LD2410 support gives you live coordinate data, which means you can tune zones to match your actual stairs instead of guessing, and that’s what finally kills the false triggers and dead spots that plague generic PIR setups or basic single-zone sensors.