Skip to content

Setup wizard does not persist Octopus Energy provider selection #112

Description

@johanzander

Problem

When an Octopus Energy user completes the setup wizard, the energy provider remains set to nordpool_official with an empty config_entry_id. The system cannot fetch any price data and fails to initialize.

Evidence

From debug log in #60:

Failed to serialize price data: Failed to get price data: Nordpool integration not configured: config_entry_id is missing.

Stored config shows:

  • "provider": "nordpool_official" (should be "octopus")
  • "octopus": {} (empty — no entity IDs persisted)
  • Discovery correctly returned octopus_found: true

The user's API calls show only POST /api/setup/confirm, never POST /api/setup/complete.

Root Cause

ConfirmSetupPayload in api_dataclasses.py only accepts sensors, nordpool_area, nordpool_config_entry_id, and growatt_device_id. There is no field for energy provider or Octopus entity IDs. Only APISetupCompletePayload (used by /api/setup/complete) has these fields.

The frontend wizard uses /api/setup/confirm which silently drops the provider selection.

Fix

Either:

  1. Add provider and Octopus entity fields to ConfirmSetupPayload, or
  2. Ensure the frontend wizard calls /api/setup/complete instead of /api/setup/confirm, or
  3. Auto-set provider to octopus when discovery detects Octopus and no Nordpool

Ref

Reported by @GraemeDBlue in #60.

Metadata

Metadata

Assignees

No one assigned

    Labels

    analyzedRoot-cause diagnosis posted, awaiting @claude-bot fixbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions