fix(dev): generate the ATW testing dashboard from the entity registry - #276
Merged
andrew-blake merged 2 commits intoAug 27, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/atw-water-temp-report-unification #276 +/- ##
=======================================================================
Coverage 93.21% 93.21%
=======================================================================
Files 44 44
Lines 2904 2904
=======================================================================
Hits 2707 2707
Misses 197 197
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
andrew-blake
force-pushed
the
feat/dev-dashboard-generator
branch
from
August 24, 2026 06:32
71738d6 to
fcfb53a
Compare
andrew-blake
force-pushed
the
feat/dev-dashboard-generator
branch
from
August 24, 2026 06:34
fcfb53a to
4e1c466
Compare
The dev dashboard's entity IDs went stale: every card read "Entity not found" because the IDs predate the building-name prefix that entity IDs carry today. A saved snapshot cannot be committed to fix that — for real devices the prefix is the building name, and one of those is a street address — so the design is committed as a generator instead. - tools/build_dev_dashboard.py discovers ATW units from the entity registry (a water heater identifies a unit, a second climate entity identifies zone 2) and reads device names at runtime, so nothing personal reaches the repo - --mock-only emits just the mock server's two buildings, which is what the committed template is built with; an unrecognised building is treated as real and excluded, so a stale list costs a missing view rather than a leak - each unit gets live tiles, a 7-day statistics graph, a 24h raw-state graph and a last_reading table, following the prod ATW dashboards' card vocabulary - every water-temperature series is graphed whether or not its entity still exists: #266 stopped creating the ones for absent hardware, and where a series stops is the discontinuity worth comparing against the vendor's app - the raw-state graph exists because statistics hide what ADR-023 changed: a missing reading is a gap there, not a flat line make dev-reset restores dev-config-template/.storage, so the mock views now survive a reset; re-run the generator to add the real units back. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The tool had no reference anywhere: not in DEV-SETUP.md, tools/README.md, CLAUDE.md or the Makefile, so its usage lived only in its own docstring. - DEV-SETUP.md gains a section next to `make dev-reset`, which is what the committed template exists to survive, and states why the committed copy is built with `--mock-only` - tools/README.md gains a short entry beside the deployment tool 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
andrew-blake
force-pushed
the
feat/dev-dashboard-generator
branch
from
August 27, 2026 18:50
4e1c466 to
f8709fc
Compare
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds on
feat/atw-water-temp-report-unification, whose water-temperature behaviour these cards are there to exercise; that branch has no PR number yet, so expect one to replace the branch name here.tools/build_dev_dashboard.pygenerates the dev ATW testing dashboard from the live HA entity and device registries: one view per ATW unit, with zone 2 and the device's display name resolved at run time. Entity IDs carry the building name as a prefix, and for real devices that prefix is personal data, so--mock-onlylimits the output to the mock server's synthetic buildings and that filtered form is what is committed underdev-config-template/.storage/, where it survivesmake dev-reset. The water-temperature cards cover every vendor-defined series, including the ones #266's capability gating leaves uncreated. Design rationale lives in the module docstring;last_readingsemantics are in ADR-022 (docs/decisions/022-reading-provenance.md) and the report source in ADR-023 (docs/decisions/023-atw-water-temperatures-from-report.md).Risks accepted
Regenerating the committed template without
--mock-onlywrites real building and device names into the repo. The generator's building allowlist only decides which units that flag keeps, so nothing blocks the unfiltered form, and detection rests on diff review at commit time because these names are not a pattern gitleaks matches. Undo is a regenerate with the flag, plus a history rewrite if the leak has already landed.AI Disclosure
Testing
make pre-commit: all 12 hooks pass, gitleaks included.--mock-onlyoutput is byte-identical to the committeddev-config-template/.storage/lovelace.melcloudhome_testing, so that file is regenerable and holds only the mock server's two synthetic buildings.ha-melcloud-devcontainer serves the generated 4-view dashboard with no lovelace or dashboard errors across its startups; its only melcloudhome warnings come from the mock's randomised telemetry.make test-api,make test-integration,make test-e2e: not run here; the diff is one dev-only script and a lovelace JSON, neither on a test path.tools/build_dev_dashboard.py: none exists.tools/sits outsidecustom_components/so nothing in this layer ships to users.