Hankanman / Area-Occupancy-Detection
Code health
This codebase scores 7.4 out of 10 for code health, which we rate good. It also scores maintainability 8.0 and static performance 9.8 out of 10. The three are scored separately and never blended into one number. Risk is concentrated, as it usually is: 31 of 234 files are git hotspots, and they average 6.7 — which is where the fixes pay off most.
Do next
1 suggested
1 thing worth doing in the week to Oct 22, the last indexed commit, 1 of them now.
Now
- High
Simplify
async_shutdownincustom_components/area_occupancy/coordinator.pywhile the change is fresh1 commit in the last 7 days added or worsened 1 critical or high finding here, still open. Fixing now costs less than after the next change.
- serious findings
- 1
- critical
- 0
- latest commit
- fix: consolidate health alerts for sensors shared across rooms (#612)
Small effort
Improve what Repowise can see
Add a test coverage report
Without one, Repowise cannot tell tested code from untested code, so every test-related action says “unknown”.
- line coverage
- Unknown, no report
Small effort
- Lines of code
- 78.7K
Recent activity
All commitsCommits
- 892c080cdocs(calculation): show the fading motion strength as the hold alone (#630)26m ago
- 0ec5b889feat(entities): follow in-place entity_id renames (HA 2026.11, #614) (#627)2h ago
- e1a44458fix(sync): a sensor whose area changed no longer fails every sync (#613) (#626)2h ago
- 413c1c44chore(deps): bump urllib3 from 2.7.0 to 2.8.0 (#581)3h ago
- 11755762chore(deps): bump virtualenv from 21.5.1 to 21.7.13 (#585)3h ago
- 32b8fdafchore(deps): bump multidict from 6.7.1 to 6.9.1 (#601)3h ago
Decisions
- Add additive per-area custom_sensors with per-entity active_states and weightproposed · 20m ago
- Always show advanced fields in config/option schemasproposed · 20m ago
- Avoid repeated fusion training and fix health/config/schema issuesproposed · 20m ago
- Compute zone priors from union of rooms' occupied intervalsproposed · 20m ago
- Zone presence detection now uses highest room probability and union-based priors (not means)proposed · 20m ago
- Compute AllAreas/FloorAreas attributes from only relevant areasproposed · 20m ago
Everything we found
761 open
Every detector's open count by area, each with its worst example. An inventory, not a to-do list: the actions above are the part worth doing.
- worst item is critical severity. Code health529Nested complexity · custom_components/area_occupancy/data/entity.py29 findings · 7.7 deducted
- worst item is low severity. Refactoring110_area_snapshot+0.9 health, M effort · custom_components/area_occupancy/diagnostics.py
- worst item is medium severity. Decisions79custom_components/area_occupancy/coordinator.py48 awaiting review · 31 hotspots ungoverned
- worst item is medium severity. Ownership41custom_components/area_occupancy/data/health.py88% single-owner concentration, 16 commits in 90d
- worst item is low severity. Dead code2get_friendly_state_nameUnreachable function (7 lines)
Composition
Open the graph- python91%
- shell6%
- javascript3%
- dockerfile<1%
Explore this codebase
- Docs460 pages across 8 modules
- ChatAsk this codebase a question and get an answer with its sources.
- Files234 files with per-file docs, health and history
- ArchitectureDependency graph, layers, and 4 entry points
- Code healthPer-file scores, 642 open findings, coverage and refactoring targets
- Knowledge graphEntities, communities, and the paths between them
- Change couplingFiles that keep changing together, mined from commit history
- CommitsChange-risk ranked history with agent provenance
- ContributorsBus factor, per-file maintainers, and the human/agent split
- StatsSize class, origin, lifetime churn, rhythm and records
- CostsWhat indexing this snapshot cost, by model and by run.