YAML export wiring + CORS / proxy notes for HA integration (slice of #5) #10
Labels
No labels
bug
documentation
enhancement
in-progress
test
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/kimi_agent_home_assistant#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent-Issue: #5
Slice 6 of issue #5 decomposition (plus acceptance-criteria items related to deployment concerns). Once the user has picked which entities belong to which room, the editor must round-trip them through static YAML export, and the deployment story must address HA's CORS posture.
Scope (one PR):
haEntitieslist alongside the existing static entity IDs.docs/home-assistant.md:http:/https:is the canonical entry; users will hit CORS when the editor is served from a different origin.vite.config.tsserver.proxy['/ha']) that forwards/ha/*to the HA URL with the user's token injected from localStorage. Same proxy pattern can be reused for production via nginx (see issue #6's nginx config).Acceptance criteria:
loadFromYaml(or equivalent importer) without losing selections.ha_entities:with a stable schema).npm run build,npm run lint,npm run typecheck(tsc -b) all pass. Add a unit test or fixture for the YAML round-trip.Out of scope:
src/lib/ha-api.ts(kept as-is from #5 Slice 1).Closing retroactively after fix landed on origin/main.
Commits (rebased onto origin/main):
a8d385b— Apply changes from kilo-gsd.py run for Mark/kimi_agent_home_assistant#10 (full slice: YAML exporter withha_entities:stable key, Vite dev-server proxy + nginx cross-ref,docs/home-assistant.mdCORS guide, error toast UI)984e603— test(floorplan): fix no-regex-spaces lint error in YAML round-trip test (companion: test for the round-trip acceptance criterion)Acceptance criteria check:
ha_entities:per-room stable key —src/hooks/useFloorplan.ts(280 lines)984e603companion commitvite.config.ts+docs/home-assistant.mdnpm run build,npm run lint,npm run typecheck(tsc -b) all pass — confirmed in kilo-gsd Verify gateCard closure was correct; close step was bypassed by a push-failed-recovery retry path (non-fast-forward against remote
529de40, rebase onto origin/main + fast-forward push landed the fix).