Motion sensors are great at detecting motion and bad at answering the question you actually care about: is this room occupied right now? A PIR drops you the second you sit still, an mmWave flickers, a door tells you someone crossed a threshold but not which way. I kept papering over this with per-room timer helpers and template sensors and it never really held up.
So I built HA Soft Presence — a custom integration that fuses all the sensors you already have for a room into a single, debounced binary_sensor.<room>_presence_soft with a proper state machine behind it. You configure each room once through a UI wizard; it creates the presence sensor plus score / confidence / reason sensors you can build automations and dashboards on.
The idea is inspired by Aqara’s “soft presence” concept (credit below) — HA Soft Presence brings it to Home Assistant and makes it vendor-agnostic: it works with whatever sensors you already have, across any brand.
What it does
-
Sensor fusion — combines mmWave, PIR, ESPresense/BLE room, camera person-count, doors, windows, locks, media players, lights/switches and workstation power into one weighted score.
-
State machine with hysteresis — separate occupied/clear thresholds + a no-presence timeout, so the room doesn’t flicker on every dropped signal.
-
Door-closed lock-in — if the door has been shut since you were last seen, the room stays occupied even when you sit dead still (where mmWave often loses you).
-
Entry-gate — the flip side: a closed door that never opened proves nobody entered, so a stray PIR/mmWave trigger can’t mark an empty room occupied. On by default for any room with a door contact; per-room opt-out for an unreliable contact.
-
Transit rooms — hallways clear fast and never lock in.
-
Sleep mode — raise the bar at night so a still sleeper isn’t cleared.
-
Optional AI advisory — an off-by-default second opinion via any HA conversation agent or a direct OpenAI-compatible endpoint. It never drives the sensor; it’s a sanity-check indicator only.
-
Diagnostics + Repairs — every room exposes its live score / reason / active sources; misconfiguration surfaces as an HA repair issue.
-
UI config flow, per room, with fields pre-filled from the matching HA area. Translated into 11 languages.
How it decides (short version)
Each configured sensor contributes a weight to a 0–100 score. Cross occupied_threshold → OCCUPIED. Drop below clear_threshold → start the timeout → CLEAR. The door lock-in, entry-gate, sleep mode and transit rules adjust the thresholds/timeout around that core. A manually-on light counts only as weak supporting evidence — it can never hold a room occupied by itself.
“Why not just a Bayesian sensor or a template?”
Fair question — I started with both. The built-in Bayesian sensor is stateless: it recomputes a probability from the current sensor readings every moment. It has no memory that the room was occupied, so it can’t hold a room while you sit still behind a closed door (mmWave loses you → probability falls → “clear”), and it can’t reason about direction — “the door hasn’t opened since you came in, so that stray PIR is noise.” You also hand-tune a prior + per-sensor probabilities. Template sensors mean hand-rolling timers and a state machine in Jinja that gets brittle fast — I had a pile of timer.* + input_boolean.* helpers per room and it was a maintenance sink.
Soft Presence adds the two things those approaches lack: memory + state (a real state machine with hysteresis, a no-presence timeout, and door lock-in) and causality (the entry-gate — door closed and never opened means nobody entered, so ignore ambiguous motion). The weighted score is the Bayesian-ish part; the state machine on top is what makes it actually hold up for lighting automations. For me it replaced a pile of per-room timer.* + template helpers and made presence-based lighting reliable — it’s saved me a lot of automation fiddling across the house. That’s what it’s for.
Install
Not in the HACS default store yet (submission pending review) — but you can add
it as a custom repository with one click and still get the full HACS experience,
including update notifications:
Add to HACS with one click
— or manually: HACS → Integrations → ⋮ → Custom repositories → add
https://github.com/SkyTechNerds/ha-soft-presence as Integration.
Then install HA Soft Presence, restart Home Assistant, and
start the setup wizard
(or Settings → Devices & Services → Add Integration → search for “HA Soft Presence”).
No YAML needed — each room is configured through a multi-step UI wizard.
Repo (README, full docs, screenshots): GitHub - SkyTechNerds/ha-soft-presence: Home Assistant custom integration: Virtual presence sensors with sensor fusion and optional LLM support · GitHub
License: MIT. It’s a personal project I use at home, shared in case it’s useful.
Feedback wanted
It’s been running my own house (9 rooms) for weeks and I’ve been ironing out real-world edge cases as they show up — false occupancy from a chattering door contact, a light that held a room occupied in sleep mode, hallways lingering too long, etc. I’d love to hear how it behaves in different setups, and which sensor types or edge cases I’ve missed.
Credits
Concept inspired by the Aqara Presence Soft Sensor concept — this is a vendor-agnostic Home Assistant take on the same idea, working across whatever sensors you already have.



