2026.5.1
✨ New: Diagnostics Export (#447)
Home Assistant's standard Download diagnostics is now wired up for the integration - one click captures a complete JSON snapshot of priors, weights, evidence, decay state, learned correlations, occupied-intervals cache freshness, and cached health issues without enabling DEBUG logging.
Open the integration card in Settings → Devices & Services, click the ⋮ menu, and choose Download diagnostics. The export is grouped into integration (versions, config schema, area count), areas (per-area current / prior / config / entities / health subsections), and database (row counts and per-area cache validity). Each entity row includes analysis_error, correlation_strength, evidence, previous_evidence, last_updated, and full decay state - every field a triager would otherwise have to ask for.
This is the right thing to attach when opening a "why does occupancy look wrong?" issue. See the new Diagnostics docs for the full field map and what questions the dump can answer.
✨ New: Pipeline Health Checks (#448)
The same hourly health monitor that flags stuck/offline sensors now also flags calculation pipeline problems per area, surfaced in Settings → System → Repairs under their own pipeline_health_* translation key family.
| Issue | When it fires | Severity |
|---|---|---|
| Insufficient priors | Area has been running > 7 days but no global prior has been learned — every Bayesian update is silently using a minimum baseline | Warning |
| Stale intervals cache | Occupied-intervals cache is > 25h old (or never populated for a > 7-day-old area) - the analysis pipeline has stopped refreshing | Error |
| Slow analysis | Most recent analysis cycle took > 30s — usually database pressure, large sensor count, or long-running correlation | Warning |
| Correlation failures | Half or more of the area's correlatable sensors failed correlation analysis on the last cycle | Warning |
Each repair has a tailored "What to do" section, and all four auto-resolve when the next analysis cycle finds the underlying state has recovered.
✨ New: "Reset Learning" UI Button (#451)
Resetting a single area's learned history no longer requires calling the area_occupancy.purge_area_history service from Developer Tools. Open Configure → Manage Areas → <area> → Reset Learning, confirm, and the area's intervals, priors, correlations, and aggregates are wiped while the area config and sensor selection stay intact. The next analysis cycle starts re-learning from current recorder data.
Same destructive behaviour as the YAML service - same trade-offs.
Performance
- perf(correlation): parallelize per-area sensor analysis by @Hankanman in #449
run_correlation_analysispreviously walked every (area, entity) pair serially, so the analysis step's wall-clock time scaled with the sum of per-area work. Per-area calls now run viaasyncio.gather(..., return_exceptions=True), dropping the wall-clock to roughlymax(per-area)while keeping per-entity loops within an area serial (preserves error semantics, doesn't saturate the executor pool). One area's failure no longer aborts the others.
- fix(analysis): cancellable, bisect-indexed correlation pipeline by @Hankanman in #452
- Closes #450. The correlation pipeline now cooperates with Home Assistant shutdown — long-running analysis cancels cleanly instead of leaving "Task was still running" warnings on stop. Interval lookups use bisect indexing for faster scans on large histories.
Fixes
- fix: TypeError on naive vs aware datetime in health checks by @ralong777 in #446
- First contribution — thanks @ralong777!
Docs
- New: Diagnostics — full field reference and "what questions can it answer" guide.
- Updated: Sensor Health Monitoring — new "Pipeline Health" section.
- Updated: Services —
purge_area_historyservice plus the equivalent UI flow. - Updated: Debugging — diagnostics export is now the recommended first step.
Issues Resolved
- #450 — correlation pipeline didn't cancel cleanly on Home Assistant shutdown
A big thank you to those who have chosen to sponsor my work!
You can sponsor me here
What's Changed
- Fix TypeError on naive vs aware datetime in health checks by @ralong777 in #446
- feat(diagnostics): add config entry diagnostics export by @Hankanman in #447
- feat(health): pipeline-scope checks (priors, cache, slow analysis, correlations) by @Hankanman in #448
- perf(correlation): parallelize per-area sensor analysis by @Hankanman in #449
- feat(config-flow): "Reset Learning" button in area options by @Hankanman in #451
- fix(analysis): cancellable, bisect-indexed correlation pipeline (#450) by @Hankanman in #452
New Contributors
- @ralong777 made their first contribution in #446
Full Changelog: 2026.4.1...2026.5.1