feat(wall-panels): user-configurable plug metadata via Settings view #104

Merged
kblack0610 merged 2 commits from feat/wall-panel-plug-settings into master 2026-07-08 17:52:42 +00:00
Owner

Adds a Settings view to the wall panels where any user (non-admin, kiosk) can set each plug’s room, name, icon, category, and is-a-light flag. Metadata lives in HA’s native registries (areas/labels/entity overrides + switch_as_x), written by a vendored pyscript app + browser_mod popup.

Phase 1 (no new deps): seed-areas baseline room palette; dashboards show each plug’s room (Unassigned until placed).
Phase 2: pyscript vendored; plug_load/plug_apply services; staging-helper package; Settings view (button-card rows) + nav chip; managed-config wiring.

Verification pending live rollout: seeds, room grouping render, live non-admin edit, restart-survival.

Adds a **Settings** view to the wall panels where any user (non-admin, kiosk) can set each plug’s room, name, icon, category, and is-a-light flag. Metadata lives in HA’s native registries (areas/labels/entity overrides + switch_as_x), written by a vendored pyscript app + browser_mod popup. **Phase 1 (no new deps):** seed-areas baseline room palette; dashboards show each plug’s room (Unassigned until placed). **Phase 2:** pyscript vendored; plug_load/plug_apply services; staging-helper package; Settings view (button-card rows) + nav chip; managed-config wiring. Verification pending live rollout: seeds, room grouping render, live non-admin edit, restart-survival.
Any user (non-admin, on the kiosk) can now configure each smart plug's
room, name, icon, category, and is-a-light flag from a new "Settings"
view — no admin, no YAML edit, no git push.

All metadata lives in HA's native registries (the "db"):
  room     -> core.area_registry + entity.area_id
  name     -> core.entity_registry name override
  icon     -> core.entity_registry icon override
  category -> core.label_registry + entity.labels
  is-light -> switch_as_x config entry (add/remove)

so it also powers native features (voice "turn off the living room",
area cards, target: area_id).

Phase 1 (no new deps):
- seed-areas init container seeds a baseline room palette (idempotent,
  non-destructive; plugs start Unassigned — users place them live).
- Smart Plugs sections in wall/overview/devices dashboards now show each
  plug's room dynamically (secondary text), Unassigned until placed.

Phase 2 (live kiosk editing):
- Vendor pyscript (browser_mod tarball idiom); pyscript: block added to
  configuration.yaml (hass_is_global + allow_all_imports).
- config/pyscript/plug_settings.py: non-admin-callable plug_load/plug_apply
  services that write the registries + reconcile switch_as_x; startup
  reconcile creates baseline category labels.
- config/packages/plug_settings.yaml: fixed staging helpers + a
  script.plug_edit_open that loads a plug and opens a browser_mod popup.
- wall.yaml: new Settings view (button-card rows -> editor popup) + a
  Settings chip in the nav. button-card is used because HA core doesn't
  template tap_action service data; its [[[ ]]] JS passes the plug id.
- Wired the new package + pyscript app through kustomization + the
  authoritative sync-managed-config init container (now prunes pyscript/).

The pyscript services are a deliberate, LAN/Tailscale-only privileged
surface (HA has no set-area/set-name service; native editors are
admin-only and hidden in kiosk).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kblack0610/home-config!104
No description provided.