Presence detection is the backbone of a truly smart home. Lights that turn on when you walk in, heating that stops when nobody's home, alarms that arm themselves. But getting it right means picking the right method for each job. Here's how they all work, what they cost, and when to use each one.
Each presence detection method excels at something different. Some tell you if someone is home. Others tell you which room they're in. The best setups combine two or three.
The easiest way to know if someone is home or away. The Home Assistant Companion App tracks your phone's location using GPS and Wi-Fi connection state. It's free, accurate for home/away, and works out of the box.
The Companion App (available for iOS and Android) reports your phone's GPS coordinates and Wi-Fi SSID to Home Assistant. When your phone connects to your home Wi-Fi or enters your home's GPS zone, HA marks you as "home." When you leave, it switches to "away."
consider_home to 10+ minutes in your device_tracker config. This prevents brief GPS glitches from triggering away automations.Pro tip: Use the person entity instead of individual device trackers. The person entity can combine multiple trackers (app + router + Bluetooth) and picks the most recent update. This gives you much better accuracy than any single source.
Want to know which room you're in, beyond basic home/away detection? ESPresense turns cheap ESP32 boards into Bluetooth proximity sensors. Place one in each room, and your smart home knows where everyone is based on the Bluetooth signal from their phone, watch, or fitness tracker.
ESPresense runs on ESP32 microcontrollers (about โฌ5 each). Each ESP32 listens for Bluetooth Low Energy (BLE) advertisements from your devices. It measures signal strength (RSSI) and reports the distance estimate to Home Assistant via MQTT. The room where your device has the strongest signal is where you are.
Hardware
Software
Pro tip: Use Apple Watches or fitness bands as tracking targets. They broadcast BLE more consistently than phones, which sometimes throttle Bluetooth in power-saving mode. An Apple Watch with "always on" gives you rock-solid room detection.
This is what makes room presence actually work. mmWave (millimeter wave) radar detects people by sensing micro-movements like breathing and heartbeat. Unlike PIR motion sensors, mmWave knows you're in the room even when you're sitting perfectly still on the couch.
Aqara FP2
~โฌ50
The most popular choice. Wi-Fi connected, zone detection (track multiple areas in one room), integrates natively with HA via HomeKit or the Aqara integration. Great accuracy, easy setup.
Everything Presence One
~โฌ35
Open-source, ESPHome-based. Combines mmWave with PIR, temperature, humidity, and light sensors. More tinkering required, but fully local and very customizable.
DIY ESP32 + LD2410
~โฌ10
The budget option. An ESP32 board plus an LD2410 radar module, flashed with ESPHome. Requires soldering or a breakout board. Very capable for the price, but you'll spend time calibrating sensitivity gates.
Placement tip: Mount mmWave sensors on the ceiling or high on a wall, angled down at 15 to 30 degrees. This reduces false triggers from pets and gives better coverage of the room. The Aqara FP2 works best ceiling-mounted at 2.5 to 3 meters height.
The classic. PIR (passive infrared) sensors detect movement by sensing changes in infrared radiation. They're cheap, reliable, and perfect for high-traffic areas. The catch: they only detect motion, not presence. Sit still long enough and they'll think you left.
Pro tip: Use PIR sensors with a long "off delay" (5 to 15 minutes) in rooms where you might sit still. This isn't true presence detection, but it's often good enough for lighting automations. Pair with mmWave in rooms where it's not.
Your router already knows which devices are connected. Home Assistant can use that information for home/away detection without installing any app. Response time is slower than GPS, but it works as a solid backup layer.
UniFi
Native HA integration. Tracks connected clients with fast detection. One of the best router-based options.
Fritz!Box
Popular in Europe (especially Germany and Netherlands). Native HA integration, reliable device tracking.
Nmap / Ping
Works with any router. HA pings devices on your network to check if they're connected. Slower and less reliable, but universal.
OPNsense / pfSense
For the power users running their own firewall. ARP table monitoring gives reliable presence data.
Watch out: Modern phones disconnect from Wi-Fi to save battery when the screen is off. This causes delayed or false "away" detection. Set consider_home to at least 15 minutes with router-based tracking. Better yet, use it as a secondary source alongside the Companion App.
No single method is perfect. The real magic happens when you layer them together. Home Assistant gives you two main tools for this: the person entity and Bayesian binary sensors.
The person entity in HA combines multiple device trackers into one. Assign your Companion App tracker and your router tracker to the same person. HA picks the most confident result. If your phone GPS says "home" but the router says "not connected," HA can weigh the GPS higher because it updated more recently.
For room-level accuracy, the Bayesian sensor is your best friend. It takes multiple signals (PIR motion, mmWave presence, Bluetooth proximity, media player state, computer active) and calculates the probability that someone is in a room.
Example: Living Room Presence
binary_sensor:
- platform: bayesian
name: "Living Room Occupied"
prior: 0.4
probability_threshold: 0.8
observations:
- platform: state
entity_id: binary_sensor.living_room_mmwave
to_state: "on"
prob_given_true: 0.95
prob_given_false: 0.05
- platform: state
entity_id: binary_sensor.living_room_motion
to_state: "on"
prob_given_true: 0.8
prob_given_false: 0.1
- platform: state
entity_id: media_player.living_room_tv
to_state: "playing"
prob_given_true: 0.9
prob_given_false: 0.05
- platform: state
entity_id: sensor.living_room_espresense
to_state: "home"
prob_given_true: 0.85
prob_given_false: 0.1Budget Setup (~โฌ30 total)
Companion App (free) + Router tracking (free) + 2x PIR sensors for hallway and kitchen (~โฌ15 each). Good enough for basic lighting and heating automations.
Mid-Range (~โฌ100)
Everything above, plus 1x Aqara FP2 for the living room/office and 2x ESP32 boards running ESPresense for room tracking. Covers presence where it matters most.
Full House (~โฌ200-300)
mmWave in every main room (mix of FP2 and DIY LD2410), ESPresense in every room, PIR for hallways and stairs, Bayesian sensors tying it all together. This is the "lights always do the right thing" tier.
Once you have reliable presence detection, these automations practically write themselves. Here are the ones that make the biggest difference in daily life.
1. Auto-arm alarm when everyone leaves
PhoneWhen the last person's state changes to "away," wait 5 minutes, then arm the alarm. Disarm when the first person arrives.
2. Turn off all lights when nobody's home
PhoneSimple but effective. When the house is empty, turn off every light and set thermostats to away mode. Saves real money.
3. Room-follow lighting
mmWave + PIRLights follow you through the house. Walk into the kitchen, lights turn on. Leave, they turn off after 2 minutes. mmWave keeps them on while you're cooking.
4. Welcome home scene
Phone + TimeWhen you arrive home after sunset, turn on hallway and living room lights, set the thermostat to comfort mode, start your favorite playlist.
5. Office focus mode
mmWave + BayesianWhen you're detected in the office and your computer is active, set lights to "focus" scene, enable DND mode, keep the room at the right temperature.
6. Bathroom ventilation
mmWaveTurn on the fan when someone enters the bathroom. Keep it running for 10 minutes after they leave. Add humidity as a secondary trigger for showers.
7. Bedtime detection
mmWave + TimeAfter 22:00, if mmWave detects someone in the bedroom for 10+ minutes and no motion in living room, trigger "goodnight" scene: lock doors, arm alarm (night mode), dim hallway to 5%.
8. Smart doorbell greeting
PhoneIf nobody is home when the doorbell rings, send a notification with a camera snapshot. If someone IS home, just chime the speaker.
9. Room-based music
BluetoothMusic follows you from room to room. ESPresense detects which room you're in, and the automation transfers playback to that room's speaker. Pause when you leave.
10. Vacancy energy saver
Phone + TimeIf nobody has been home for 2+ hours, drop heating to eco mode, turn off standby devices, and send a summary of estimated energy savings to your phone.
You don't need to buy everything at once. Start with what's free, then add sensors where it matters.
Install the Companion App
Get the Home Assistant app on every household member's phone. This gives you free GPS and Wi-Fi-based home/away detection immediately.
Set up the Person entity
Go to Settings > People and assign device trackers to each person. Add your router integration as a second tracker for redundancy.
Build your first automation
Start simple. "Turn off all lights when nobody is home" is the perfect first automation. Test it for a week before adding complexity.
Add room-level detection where it matters
Pick your most-used room (usually living room or office) and add an mmWave sensor like the Aqara FP2 or a DIY ESP32 + LD2410. One room done well is better than five rooms done poorly.
Expand and combine
Add sensors to more rooms over time. Set up Bayesian sensors to combine multiple inputs. The goal: every automation just works, and you never touch a light switch again.
A combination of methods works best. Use the Companion App for home/away detection (geofencing plus Wi-Fi connection), and add Bluetooth or mmWave sensors for room-level tracking. No single method covers everything perfectly, so layering two or three gives you much better accuracy.
Yes, but not with phone-based tracking alone. You need room-level sensors. ESPresense (Bluetooth triangulation with ESP32 boards) can track which room your phone or watch is in. mmWave radar sensors like the Aqara FP2 detect people in a specific room without needing a phone at all. PIR motion sensors work too, but they stop detecting you if you sit still.
Phone-based detection only works for people with the Companion App installed. For guests, use device-independent methods: mmWave radar, PIR motion sensors, or Bluetooth room detection via ESPresense (if the guest has a phone with Bluetooth on, no app needed). mmWave is the most guest-friendly option because it detects any person, no phone required.
mmWave (millimeter wave) radar detects people by sensing micro-movements like breathing. Unlike PIR, it knows you're in the room even when you're sitting still. The Aqara FP2 (~โฌ50) is the most popular option. It's worth it for rooms where you sit for long periods: home office, living room, bedroom. For hallways and kitchens, a โฌ10 PIR sensor does the job.
Combine multiple detection methods using the person entity or a Bayesian sensor. Set your consider_home timer to at least 10 minutes so brief GPS glitches don't trigger away automations. Add router-based tracking as a backup, since your router always knows if your phone is connected to Wi-Fi.
Yes, this is one of the most popular automations. When the last person leaves, arm the alarm. When the first person arrives, disarm it. Add a 5 to 10 minute delay before arming to avoid false triggers. Use the Alarmo integration for a clean setup, and make sure your presence detection is reliable before trusting it with your security.
Take the free HomeShift scan. We'll look at your current smart home setup and tell you exactly which presence detection methods will work best for your devices, your budget, and your home layout.
Take the Free ScanTakes 2 minutes. No account needed.