Skip to content

feat(settings): UI to edit the installation topology - #42

Merged
gnacho merged 2 commits into
mainfrom
feat/41-topology-editor
Aug 11, 2026
Merged

gnacho merged 2 commits into
mainfrom
feat/41-topology-editor

Conversation

@gnacho

@gnacho gnacho commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Closes #41

Adds an admin-only editor in Settings ("Editar topología") that lets you configure the whole installation from the UI instead of writing install_config.topology by hand.

  • Backend: new zod topologySchema in shared/schemas.js; PUT /api/config validates topology (400 on invalid), re-resolves the in-memory topology so GET /api/install reflects the change, and returns restartNeeded (entity subscriptions are fixed at boot).
  • Frontend: TopologyEditor dialog opened from the Installation section (admin only) with add/remove inverters (name, model, kWp, panels, power/energy sensors, unit, accumulator, deep-history sources), battery (enabled, sensors, charge/discharge states), grid source (attrs vs sensor + inverter status sensor), consumption, daily-energy history and sun/weather entities.
  • Tests: 5 new schema cases (legacy/generic valid, empty inverters, bad powerUnit, bad grid.mode). Server 68/68, lint + theme-audit OK, e2e 2/2, bundle 1360/1500 KB.
  • Deployed to production and validated by the user.

Out of scope: multi-installation (Phase 4) and HAOS entity existence validation.

gnacho added 2 commits August 11, 2026 18:47
Admin-only editor in Ajustes that loads the resolved topology from
GET /api/install and saves it as install_config.topology via PUT /api/config.
Backend validates topology with a new zod schema (shared/schemas.js) and
re-resolves the in-memory topology after saving so the API reflects the
change; subscriptions still need a restart (restartNeeded).
Dialog goes from max-w-2xl to max-w-4xl on desktop and inverter fields
use a 3-column grid so the wider layout is put to use.
@gnacho
gnacho merged commit 2c288b7 into main Aug 11, 2026
4 checks passed
@gnacho
gnacho deleted the feat/41-topology-editor branch August 11, 2026 17:42
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.

UI to edit the installation topology in Settings

1 participant