Skip to content

Add Console UI for RFC-0019's Home Assistant control allowlist - #20

Merged
kasunben merged 1 commit into
mainfrom
feat/home-assistant-control-ui
Aug 22, 2026
Merged

kasunben merged 1 commit into
mainfrom
feat/home-assistant-control-ui

Conversation

@kasunben

Copy link
Copy Markdown
Member

Summary

  • Adds an "Allow control" toggle to Console's Home Assistant page, independent of the existing "Allow Home Assistant" (read) toggle, per RFC-0019's two-policy-key design
  • Adds a per-entity "Control" checkbox next to each entity's existing "Read" checkbox, offered only for light/switch-domain entities, disabled until Read is checked, and cascaded off if Read is later unchecked — a client-side mirror of the controllable_entities ⊆ allowlisted_entities invariant write_config() already enforces server-side
  • Updates the preview banner, hero copy, and entities-panel heading/hint to describe real light/switch control alongside the existing read-only description
  • Adds unit test coverage in tests/test_console.py for the new markup, sign-in/out visibility, save payload, and renderHaEntities' control-checkbox/cascade logic

Test plan

  • python3 -m unittest tests.test_console -v — 40/40 pass
  • python3 -m unittest discover -s tests -v — 622/622 pass (project-wide)
  • node --check on console.js
  • Manual browser verification against a stub backend: sign in, enable both toggles, save connection, load entities, confirm Control is offered only for light/switch domains, verify the Read→Control cascade, check Read+Control on two entities, save, reload, and confirm persistence of both the control toggle and the per-entity grants

🤖 Generated with Claude Code

Adds an "Allow control" toggle (independent of "Allow Home Assistant")
and a per-entity "Control" checkbox next to each entity's existing
"Read" checkbox, offered only for light/switch domains and cascaded
off when Read is unchecked -- a client-side mirror of the subset
invariant write_config() already enforces server-side. Manually
verified end-to-end against a stub backend, including reload
persistence.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kasunben
kasunben marked this pull request as ready for review August 22, 2026 04:17
@kasunben
kasunben merged commit 6908e91 into main Aug 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant