mirror of
https://github.com/Matysh/houseplan-card
synced 2026-07-31 08:28:31 +00:00
feat v1.12.0: Quality Scale conformance (phases 7-8)
- entry.runtime_data (HouseplanData in store.py) instead of hass.data; WS answers not_ready without a loaded entry - test-before-setup (ConfigEntryNotReady), async_unload_entry, async_remove_entry (Lovelace resource cleanup), single_config_entry in manifest - Store minor_version + migration hook; diagnostics.py (redacted); repairs (broken_plan issues, en/ru); system_health.py; strings.json - quality_scale.yaml self-assessment; HA-harness tests (config flow, WS, upload) in CI on py3.13; CI backend job updated
This commit is contained in:
@@ -1,5 +1,29 @@
|
||||
# Changelog
|
||||
|
||||
## v1.12.0 — 2026-07-05 (Quality Scale: Bronze + selected Silver/Gold)
|
||||
Backend brought to Integration Quality Scale patterns (custom integrations are not
|
||||
formally graded; progress is tracked in `custom_components/houseplan/quality_scale.yaml`):
|
||||
|
||||
- **`entry.runtime_data`** (typed `HouseplanData`: both stores + the write lock) replaces
|
||||
`hass.data[DOMAIN]` for entry data; WS handlers resolve it per call and answer
|
||||
`not_ready` while no entry is loaded. New `store.py` common module.
|
||||
- **test-before-setup**: storage readability is verified in `async_setup_entry`
|
||||
(`ConfigEntryNotReady` on failure). **Unloading** is supported; WS commands and
|
||||
static paths are global by design (documented).
|
||||
- **`single_config_entry: true`** in the manifest replaces the manual flow check.
|
||||
- **Store versioning**: stores now carry `minor_version` and a migration hook
|
||||
(`HouseplanStore._async_migrate_func`) — schema changes get a single upgrade path.
|
||||
- **Diagnostics** (`diagnostics.py`): redacted dump (options, rev, per-space stats,
|
||||
markers with personal fields redacted, layout size).
|
||||
- **Repairs**: a missing plan file raises a repair issue (`broken_plan`) with
|
||||
en/ru translations; issues clear automatically when resolved.
|
||||
- **System health** (`system_health.py`): rev, spaces/rooms/markers/layout counters.
|
||||
- **Uninstall cleanup**: `async_remove_entry` deletes our Lovelace resource entry.
|
||||
- **Tests**: config flow, WS API (layout ops, rev conflict, not_ready, plan upload
|
||||
validation), HTTP upload (ok/bad ext/traversal) on `pytest-homeassistant-custom-component`
|
||||
— run in CI on Python 3.13; pure validation tests still run anywhere.
|
||||
- `strings.json` added; translations updated.
|
||||
|
||||
## v1.11.2 — 2026-07-05 (device dialog: usable Description height)
|
||||
- The Description textarea in the device edit dialog was squeezed to ~2 lines by
|
||||
the dialog body's flex column. Now `min-height: 92px`, `flex-shrink: 0`, `rows=4`;
|
||||
|
||||
+5
-2
@@ -13,14 +13,14 @@
|
||||
|
||||
| Item | State |
|
||||
|---|---|
|
||||
| Version | **v1.11.2** everywhere (manifest, const.py, package.json, CARD_VERSION) |
|
||||
| Version | **v1.12.0** everywhere (manifest, const.py, package.json, CARD_VERSION) |
|
||||
| GitHub | https://github.com/Matysh/houseplan-card — branch `main`, releases v1.9.3…v1.11.2 |
|
||||
| CI | `.github/workflows/validate.yml` (hacs + hassfest + frontend + backend) — **fully green** since v1.11.1; `release.yml` auto-attaches the card bundle (needs `permissions: contents: write`, fixed) |
|
||||
| HACS | Works as custom repository (id 1290210112 on the home instance). **Inclusion PR: https://github.com/hacs/default/pull/8995** (queue ≈2 months as of 2026-07) |
|
||||
| Brands | Ships **inside the integration**: `custom_components/houseplan/brand/{icon,icon@2x,logo,logo@2x}.png` (HA ≥2026.3 local-brands mechanism). home-assistant/brands PR #10700 was auto-closed — that repo no longer accepts custom integrations |
|
||||
| Home instance | ha.jbstudio.pro (SSH port 323, key `ha_jb`), deployed v1.11.2, installed *via HACS* (custom repo) — updates flow through HACS now |
|
||||
| Localization | UI en/ru (`src/i18n.ts`), auto by `hass.locale` + `language` card option; codebase and docs are English-first (`README.ru.md` is the Russian copy) |
|
||||
| Tests | 15 frontend (node:test on logic/rules) + 10 backend (pytest on validation.py) |
|
||||
| Tests | 15 frontend (node:test) + 10 pure backend (anywhere) + 12 HA-harness backend (CI only, py3.13 + pytest-homeassistant-custom-component; skipped locally — sandbox has py3.10) |
|
||||
|
||||
## Recent milestones (details in CHANGELOG.md)
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
- **v1.11.0** — full English translation + en/ru UI localization.
|
||||
- **v1.11.1** — brand images inside the integration; CI fully green for the first time.
|
||||
- **v1.11.2** — Description textarea fix in the device dialog.
|
||||
- **v1.12.0** — Quality Scale conformance: runtime_data, test-before-setup, unloading,
|
||||
single_config_entry, Store migrations hook, diagnostics, repairs, system health,
|
||||
uninstall cleanup, HA-harness tests in CI, quality_scale.yaml.
|
||||
|
||||
## Where things live
|
||||
|
||||
|
||||
Reference in New Issue
Block a user