fix: remove fragile /api/setup/confirm, use registry for Octopus discovery#115
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/api/setup/confirmendpoint — wizard step 1 now advances the UI client-side without persisting partial state. All settings saved atomically via/api/setup/completeat the final step.discover_octopus_entitiesto use the entity registryplatformfield (same pattern as Growatt/SolaX discovery) instead of string-matching"octopus_energy"in entity_id. Works for renamed entities.TestConfirmSetuptests and unused pydantic imports fromapi.py.Closes #112
Test plan
pytest -m "not slow"— 185 backend tests passpytest core/bess/tests/unit/— 388 unit tests pass (15 skipped)ruff check— cleannpm run build— frontend buildsoctopus🤖 Generated with Claude Code