Skip to content

Releases: Matysh/houseplan-card

v1.13.3 — privacy cleanup

Choose a tag to compare

@Matysh Matysh released this 06 Jul 04:40

Removed the legacy assets/ directory (real floor-plan sources from the pre-v1.3 bundled-data era). Nothing referenced it; instance data lives in server-side config.

v1.13.2 — audit round 3: fixes + buildDevices test suite

Choose a tag to compare

@Matysh Matysh released this 06 Jul 00:41
  • 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 its group_lights=false inverse, 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
    pure subst() helper with a regression test).
  • Fix: _saveConfigNow refreshes 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: pointercancel on a device icon clears the long-press timer — no phantom
    info card after an aborted touch gesture.
  • Repairs check moved to repairs.py and 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:lock override in devices.ts (wins over custom
    rules — a mislabeled lock icon is safety-relevant confusion).
  • Test infra: tsconfig.test.json also compiles devices.ts/types.ts;
    scripts/fix-test-build.mjs appends .js to tsc's extensionless ESM imports.

v1.13.1 — demo GIF and contributor materials

Choose a tag to compare

@Matysh Matysh released this 05 Jul 22:04
  • 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

Choose a tag to compare

@Matysh Matysh released this 05 Jul 21:57
  • 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 → entity device_class → generic chip.
    Invalid user regexes are skipped safely.
  • Tap actions: tap_action card option (info default | 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)

Choose a tag to compare

@Matysh Matysh released this 05 Jul 21:39

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 — device dialog: usable Description field height

Choose a tag to compare

@Matysh Matysh released this 05 Jul 20:48

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

Choose a tag to compare

@Matysh Matysh released this 05 Jul 20:32
  • 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 root brand/
    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

Choose a tag to compare

@Matysh Matysh released this 05 Jul 18:44
  • UI localization (en/ru): every card string moved to src/i18n.ts dictionaries.
    The language follows the HA user profile (hass.locale) automatically; a new
    language: en|ru card 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 a loc callback in BuildCtx.
  • 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: the ru i18n dictionary,
    translations/ru.json (config flow), iconFor regex 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.md and the entire CHANGELOG
    history translated to English. translations/en.json had Russian strings — fixed.
  • Removed obsolete RELEASE_NOTES_v1.9.3.md and scripts_publish.sh (publication
    is done; the repo lives at github.com/Matysh/houseplan-card).

v1.10.0 — гонки записи, XSS, модульность

Choose a tag to compare

@Matysh Matysh released this 05 Jul 18:17

Бэкенд

  • Гонка записи устранена: все циклы 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.ts 3023 → ~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-редактора: список «пространство по умолчанию» строится
    из серверного конфига (WS config/get), а не зашитых f1/f2/yard.
  • rules.ts: удалён мёртвый экспорт GROUP_TITLES; регэкспы iconFor прекомпилированы.
  • Единый _errText() во всех обработчиках ошибок (никогда «[object Object]»).