feat(config_flow): per-provider reconfigure flow (Phase 8 PR-6)#91
Merged
Conversation
PR-6 — HA 2024.10+ "Reconfigure" button now opens a per-provider settings page. Each sub-step edits supplemental fields without losing accumulated cost history. - async_step_reconfigure(entry_data) dispatcher mirrors the PR-5 reauth pattern. Reads coordinator._current_plan_provider.id and routes to one of four sub-steps: reconfigure_amber (network + subscription fees), reconfigure_localvolts (daily supply + buy ceiling + sell floor), reconfigure_dwt_oe (daily supply only), reconfigure_dwt_aemo (daily supply only). - Unsupported entry types (CDR-plan entries) abort cleanly with reason=reconfigure_unsupported. - Each sub-step calls async_update_reload_and_abort with an updated options dict — entry.data, entry.unique_id, and runtime_data accumulators (daily_cost_history, _saving_month_aud) are unchanged. - Narrow scope per D-P8-2: region swap (DWT) and site_id swap (Amber) are NOT exposed — they would invalidate the entry's unique_id which is region-derived from Phase 7 PR-2b. Future major version with unique_id redesign can expose full reconfigure. - strings + translations: 4 new step descriptions + 2 abort reasons. - 15 new tests; 925 total pass. Decisions: DECISIONS.md > D-P8-2. Co-Authored-By: Claude Opus 4.7 (1M context) <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
PR-6 — HA 2024.10+ "Reconfigure" button now opens a per-provider settings page that lets users adjust supplemental fields (fees, supply charges, buy/sell guard rails) without losing accumulated cost history.
async_step_reconfigure(entry_data)dispatcher routes bycoordinator._current_plan_provider.idto one of four sub-steps. Mirrors the PR-5 reauth dispatcher pattern.reconfigure_amber(fees),reconfigure_localvolts(supply + ceiling + floor),reconfigure_dwt_oe(supply),reconfigure_dwt_aemo(supply). CDR-plan entries getreconfigure_unsupportedabort.async_update_reload_and_abort(entry, options={...})—entry.data,entry.unique_id, andruntime_dataaccumulators are unchanged.Stacked on PR #90.
Test plan
pytest -q→ 925 passed (910 + 15)ruff check→ cleanDecisions: D-P8-2.