Skip to content

fix: remove fragile /api/setup/confirm, use registry for Octopus discovery#115

Merged
johanzander merged 2 commits into
mainfrom
fix/wizard-octopus-persist
Jun 9, 2026
Merged

fix: remove fragile /api/setup/confirm, use registry for Octopus discovery#115
johanzander merged 2 commits into
mainfrom
fix/wizard-octopus-persist

Conversation

@johanzander

Copy link
Copy Markdown
Owner

Summary

  • Remove /api/setup/confirm endpoint — wizard step 1 now advances the UI client-side without persisting partial state. All settings saved atomically via /api/setup/complete at the final step.
  • Rewrite discover_octopus_entities to use the entity registry platform field (same pattern as Growatt/SolaX discovery) instead of string-matching "octopus_energy" in entity_id. Works for renamed entities.
  • Remove TestConfirmSetup tests and unused pydantic imports from api.py.

Closes #112

Test plan

  • pytest -m "not slow" — 185 backend tests pass
  • pytest core/bess/tests/unit/ — 388 unit tests pass (15 skipped)
  • ruff check — clean
  • npm run build — frontend builds
  • E2E: run wizard with Octopus-only scenario, verify provider persists as octopus

🤖 Generated with Claude Code

johanzander and others added 2 commits June 9, 2026 20:50
…overy (#112)

The setup wizard had two endpoints: /api/setup/confirm (step 1, sensors only)
and /api/setup/complete (final step, everything). If a user abandoned the wizard
between steps, the system was left half-configured with provider defaulting to
nordpool_official and empty Octopus config.

- Remove /api/setup/confirm endpoint — step 1 now advances the UI without
  persisting. All settings are saved atomically via /api/setup/complete.
- Rewrite discover_octopus_entities to use entity registry platform field
  (same approach as Growatt/SolaX discovery) instead of string-matching
  "octopus_energy" in entity_id. Works for renamed entities.
- Remove TestConfirmSetup tests, clean up unused pydantic imports.

Closes #112

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…covery

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@johanzander johanzander merged commit 3c410dc into main Jun 9, 2026
7 checks 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.

Setup wizard does not persist Octopus Energy provider selection

1 participant