Releases: Matysh/houseplan-card
Releases · Matysh/houseplan-card
Release list
v1.13.3 — privacy cleanup
v1.13.2 — audit round 3: fixes + buildDevices test suite
- buildDevices finally has a direct unit-test suite (12 tests on a fake hass):
area filtering, curation incl. show-all, duplicate numbering, light-group folding
and itsgroup_lights=falseinverse, marker claim/metadata/hidden/virtual/entity
paths, custom icon rules + the deliberate lock override, device_class fallback,
primary-entity priority, LQI/temperature extraction. Frontend tests: 28 → 41. - Fix:
t()now substitutes every occurrence of a placeholder (extracted as the
puresubst()helper with a regression test). - Fix:
_saveConfigNowrefreshes the local config on a rev conflict before
rethrowing — a retry no longer hits the same conflict (the debounced path already
did this; the immediate path did not). - Fix:
pointercancelon a device icon clears the long-press timer — no phantom
info card after an aborted touch gesture. - Repairs check moved to
repairs.pyand now re-runs after every config save,
so a missing/restored plan file is reflected in the Repairs UI without a restart. - Documented the deliberate
mdi:lockoverride indevices.ts(wins over custom
rules — a mislabeled lock icon is safety-relevant confusion). - Test infra:
tsconfig.test.jsonalso compilesdevices.ts/types.ts;
scripts/fix-test-build.mjsappends.jsto tsc's extensionless ESM imports.
v1.13.1 — demo GIF and contributor materials
- Demo GIF in the README — recorded on a fully synthetic demo home (no real
floor plans): live states, tap-to-toggle, drag, zoom, info card, space tabs. - GitHub issue templates (bug report with diagnostics hint, feature request),
CONTRIBUTING.md(5-minute setup, ground rules, architecture pointers),
Discussions enabled.
v1.13.0 — floors import, editable icon rules, tap actions
- Floors import wizard: on first run, if the HA registry has floors, the card
offers to create a space per floor — names prefilled, the (mandatory) plan image is
requested step by step, any floor can be skipped; after the last one the room-markup
mode opens automatically. No floors / old HA → the old single-dialog onboarding. - Editable icon rules: the built-in "name pattern → MDI icon" rules are now data
(settings.icon_rules) with an in-card editor (⬡ in the header): reorder, delete,
add, live test field, invalid-regex highlighting, one-click reset to the bilingual
(EN/RU) defaults. Fallback chain: rules → entitydevice_class→ generic chip.
Invalid user regexes are skipped safely. - Tap actions:
tap_actioncard option (infodefault |more-info|toggle)
plus a per-device override in the device dialog. Safety model: a card-wide toggle
only affects lights/switches/fans/humidifiers; covers/valves need a conscious
per-device toggle; locks and alarm panels never toggle from the plan. A long press
(600 ms) always opens the info card. - i18n dictionaries moved to JSON (
src/i18n/{en,ru}.json) — new languages can be
contributed without touching TypeScript; tests enforce key and placeholder parity. - Light-theme pass: hardcoded dark badge backgrounds replaced with theme variables.
- Tests: 28 frontend (was 15) — tap-action resolver incl. security cases, icon-rule
compilation/overrides/device-class fallback, floors sorting, i18n parity.
v1.12.0 — Quality Scale conformance (Bronze + Silver/Gold picks)
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(typedHouseplanData: both stores + the write lock) replaces
hass.data[DOMAIN]for entry data; WS handlers resolve it per call and answer
not_readywhile no entry is loaded. Newstore.pycommon module.- test-before-setup: storage readability is verified in
async_setup_entry
(ConfigEntryNotReadyon failure). Unloading is supported; WS commands and
static paths are global by design (documented). single_config_entry: truein the manifest replaces the manual flow check.- Store versioning: stores now carry
minor_versionand 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_entrydeletes our Lovelace resource entry. - Tests: config flow, WS API (layout ops, rev conflict, not_ready, plan upload
validation), HTTP upload (ok/bad ext/traversal) onpytest-homeassistant-custom-component
— run in CI on Python 3.13; pure validation tests still run anywhere. strings.jsonadded; translations updated.
v1.11.2 — device dialog: usable Description field height
The Description textarea in the device edit dialog was squeezed to ~2 lines by the dialog body flex column. Now min-height: 92px, flex-shrink: 0, rows=4 (still resizable vertically).
v1.11.1 — brand images inside the integration
- Brand icon and logo (256/512, transparent background) now live in
custom_components/houseplan/brand/— the native mechanism for custom
integrations since Home Assistant 2026.3 (served via/api/brands/...,
local images take priority over the brands CDN). The former rootbrand/
directory is gone, and no home-assistant/brands PR is needed (theirs bot
closes such PRs as obsolete).
v1.11.0 — English translation + en/ru UI localization
- UI localization (en/ru): every card string moved to
src/i18n.tsdictionaries.
The language follows the HA user profile (hass.locale) automatically; a new
language: en|rucard option forces it. The GUI editor got the option and its own
localized labels. Generated device names (light group, unnamed, virtual device)
are localized via aloccallback inBuildCtx. - English-only codebase: all comments, docstrings, section banners, JSDoc, test
names, backend WS/HTTP error messages and log lines translated to English.
Russian remains only where it is functional or content: therui18n dictionary,
translations/ru.json(config flow),iconForregex patterns matching Russian
device names (with their test fixtures), and the Russian documentation copy. - Docs: README is now English-first with a full Russian copy in
README.ru.md;
docs/ARCHITECTURE.md,DEVELOPMENT.md,ROADMAP.mdand the entire CHANGELOG
history translated to English.translations/en.jsonhad Russian strings — fixed. - Removed obsolete
RELEASE_NOTES_v1.9.3.mdandscripts_publish.sh(publication
is done; the repo lives at github.com/Matysh/houseplan-card).
v1.10.0 — гонки записи, XSS, модульность
Бэкенд
- Гонка записи устранена: все циклы load→modify→save (
layout/set|update|delete,
config/set) сериализованы общимasyncio.Lock— параллельные WS-вызовы больше не теряют
изменения, проверкаexpected_revстала атомарной. - Новая WS-команда
houseplan/layout/delete— чистка позиции при удалении маркера
(раньше в.storage/houseplan.layoutкопились сироты). - Удалена мёртвая WS-команда
houseplan/file/set— файлы грузятся только по HTTP
(/api/houseplan/upload), как и было в карточке. - HTTP-загрузка: лимит 25 МБ применяется ПО МЕРЕ чтения multipart (обрыв на лимите),
а не после чтения всего файла в память;stat()файлов ушёл в executor. request.app[KEY_HASS]вместо устаревшегоrequest.app["hass"](с фолбэком для старых HA).
Фронтенд
- God-component разобран:
houseplan-card.ts3023 → ~1990 строк.
Стили →styles.ts; типы →types.ts; построение устройств из реестров HA
(курирование, группы света, маркеры, LQI/температура) →devices.ts(чистые функции). - Last-writer-wins в раскладке устранён:
_saveMarkerпишет позицию точечно
(layout/update), а не всей раскладкой (layout/set) — не затирает позиции из других
окон (регресс-класс инцидента v1.4.4). Перепривязка/удаление подчищают старую позицию. - XSS закрыт:
linkиpdfs[].urlмаркеров проходятsafeUrl()(только http(s)
и относительные пути;javascript:/data:отбрасываются). +12 тестов. - Загрузка файлов через
hass.fetchWithAuth(автообновление протухшего токена),
фолбэк на сырой токен. - Хардкод дачи убран из GUI-редактора: список «пространство по умолчанию» строится
из серверного конфига (WSconfig/get), а не зашитых f1/f2/yard. rules.ts: удалён мёртвый экспортGROUP_TITLES; регэкспыiconForпрекомпилированы.- Единый
_errText()во всех обработчиках ошибок (никогда «[object Object]»).