Perfect Presence Detection in Home Assistant: Stop Chasing It
Stop chasing perfect presence detection in Home Assistant. No single sensor or combination of sensors will ever be 100% accurate, and the pursuit of perfection often leads to complexity, frustration, and automations that fail at the worst moments. Instead, focus on building a presence system that is “good enough” for your specific automations, accepting that occasional false positives or negatives are a normal part of the trade-off.
Why Perfect Presence Is Impossible
Presence detection in Home Assistant is fundamentally an inference problem. You are trying to determine if a person is in a specific location (home, a room, or even a specific seat) using indirect signals like Wi-Fi connections, Bluetooth beacons, motion sensors, or GPS. Each of these signals has inherent limitations:
- Wi-Fi presence: A phone connected to your home Wi-Fi usually means you are home, but phones often stay connected when you are asleep, or disconnect when battery saver is on. It also cannot tell you which room you are in.
- Bluetooth/BLE beacons: These can provide room-level accuracy, but they require the person to carry a beacon or have a phone with Bluetooth enabled. Batteries die, phones get left on a charger, and beacons can be forgotten.
- Motion sensors (PIR): They only detect movement, not presence. Sit still reading for 20 minutes and the sensor will report “no motion,” even though you are clearly in the room.
- GPS: Useful for geofencing (arriving/departing), but accuracy can vary from 5 to 50 meters, and it drains battery if polled too frequently.
- Camera/occupancy sensors: These can be accurate but raise privacy concerns and can be fooled by pets, shadows, or curtains moving.
Every method is a proxy, and proxies are never perfect. The goal is to combine these imperfect signals to reduce uncertainty to an acceptable level, not to eliminate it.
How Home Assistant Presence Detection Works
Home Assistant aggregates presence data from multiple integrations and lets you create a person entity that combines them. The core idea is to use a Bayesian or rules-based approach to merge signals. Here is the typical setup:
- Device trackers: Each integration (e.g., router, Bluetooth, GPS on your phone app) provides a
device_trackerentity with a state ofhomeornot_home. - Person entity: You create a person and link one or more device trackers to it. The person’s state is
homeif any of the linked trackers reportshome(by default, it uses the most recent update). - Bayesian sensor: For more advanced setups, you can create a
bayesiansensor that assigns probabilities to each signal. For example, if the front door sensor is triggered and your phone’s GPS says you are within 100m, the probability you are home jumps to 95%. - Room-level detection: This often uses a combination of motion sensors, door sensors, and BLE beacons. A common pattern is to use a state machine: if motion in the living room and then motion in the kitchen, assume you moved to the kitchen.
The key is that Home Assistant does not “know” where you are; it calculates the most likely location based on the data you feed it.
Realistic Goals: What “Good Enough” Looks Like
Instead of chasing 100% accuracy, define what failures are acceptable for each automation. For example:
- Arrival lighting: A 2-3 minute delay after you walk in is fine. A false positive (lights on when no one is home) is a minor waste of energy.
- Security alarm: False negatives (not arming when you leave) are unacceptable. False positives (arming when you are still inside) are also bad. Here you need high confidence, so you might require both Wi-Fi AND GPS to agree you are away.
- Room presence for climate control: A 5-minute delay in detecting you left a room is fine. A false positive (heating an empty room) is a minor cost.
- Media pause when you leave a room: A false negative (movie keeps playing) is annoying but harmless. A false positive (pausing when you are still there) is also annoying.
Write down what failures you can tolerate for each automation. This will guide how much complexity you need.
Common Pitfalls and How to Avoid Them
Here are the mistakes most users make when trying to perfect presence detection:
- Too many trackers, no logic: Linking 5 trackers to a person makes the person entity flip to
homewhenever any one of them says home. A phone left at home while you are out will keep you “home” forever. Solution: use a Bayesian sensor or a custom integration that requires a majority or a specific combination. - Ignoring battery optimization: Phone OSes kill background apps. If your GPS tracker only updates when the app is open, presence will be stale. Solution: use a companion app with location updates set to “significant change” and whitelist it from battery optimization.
- Motion sensors with long timeouts: A PIR sensor that stays “on” for 10 minutes after last motion will keep the room “occupied” long after you left. Shorten the timeout to 1-2 minutes and use a separate occupancy sensor for presence.
- Not accounting for guests: If you use phone-based detection, guests will not be detected. For room presence, guests will trigger motion sensors but not BLE beacons. Decide if you need guest detection or if you can ignore it.
- Overfitting to a single day: You test on a day when you are home all day. Then you leave for work and the system behaves differently. Test over a week, including weekends and unusual schedules.
Cost and Complexity Trade-offs
More sensors and integrations mean more money, more maintenance, and more points of failure. A basic setup with a router and phone GPS costs nothing extra. Adding BLE beacons costs $10-30 per room. Adding mmWave presence sensors (like the Aqara FP2 or similar) costs $30-60 per room and can detect presence even when you are sitting still. Cameras with person detection cost even more and raise privacy concerns.
Before buying new hardware, ask: “Will this solve a specific problem that annoys me?” If your current system has a 95% success rate, adding a $50 sensor to get to 98% may not be worth it. Often, adjusting the logic (e.g., using a Bayesian sensor) can improve accuracy without new hardware.
Alternatives to Traditional Presence Detection
If you are tired of fighting with presence, consider these alternatives:
- Use manual overrides: A simple dashboard with buttons for “I’m home” / “I’m away” or a physical switch near the door. This is 100% accurate if you remember to press it.
- Use schedules and patterns: Instead of detecting presence, use time-of-day and day-of-week to infer when you are likely home. This works well for people with regular routines.
- Use a single reliable signal: For many people, Wi-Fi presence is good enough for home/away. For room presence, a single mmWave sensor in the most used room may be enough.
- Use presence only for critical automations: For non-critical things like lighting, use motion sensors with a short timeout and accept that lights will turn off if you sit still for 10 minutes. For critical things like security, use a dedicated system.
Frequently Asked Questions
Why does my phone still show “home” when I’ve left?
Phones often keep the Wi-Fi connection for a few minutes after you leave, or the GPS tracker may not update immediately due to battery optimization. Increase the update frequency in the companion app, or use a Bayesian sensor that requires both Wi-Fi and GPS to be away for 5 consecutive minutes before marking you as away.
Can I use my smart speaker as a presence sensor?
Yes, but with caveats. Some speakers like Google Nest or Amazon Echo can detect presence via ultrasonic or radar, but they are not directly integrated into Home Assistant for presence. You can use a custom integration or use the speaker’s API, but it is often limited to detecting if someone is in the same room as the speaker, not who it is.
What is the best presence detection method for room-level accuracy?
For room-level, mmWave presence sensors are currently the most reliable because they detect even slight movements like breathing. They are more expensive than PIR but have fewer false negatives. BLE beacons are a cheaper alternative but require carrying a device.
How do I prevent false “away” when I’m just sleeping?
This usually happens because your phone’s GPS updates stop during the night or your Wi-Fi connection drops. Set your person entity to require a longer away confirmation time (e.g., 10 minutes of no signal) and use a Bayesian sensor that gives high weight to the phone being on the charger as a “home” signal.
Is it worth using a Bayesian sensor?
Yes, if you have multiple trackers and are experiencing conflicts. A Bayesian sensor lets you assign probabilities to each signal and combine them logically. For example, if your phone GPS says away but your car’s Bluetooth is still connected, the Bayesian sensor can decide you are likely still home. It adds a bit of setup, but it is the most powerful tool for presence.
Should I use presence detection for security automations?
Only if you have high confidence. For security, use a combination of at least two independent signals (e.g., Wi-Fi and GPS) and require both to be away for a set time before arming. Also consider a dedicated alarm system with its own sensors, as Home Assistant presence is not designed for life-safety.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.