Skip to content

Bootstrap defaults hardcode Swedish locale for non-Nordpool users #113

Description

@johanzander

Problem

When a UK Octopus Energy user sets up BESS Manager, the system applies Swedish defaults: currency: "SEK", area: "SE4", vat_multiplier: 1.25, additional_costs: 0.773, tax_reduction: 0.1988. These are never overwritten because the wizard flow does not persist the correct provider (see sister issue).

Evidence

From debug log in #60, stored config for a UK user:

"currency": "SEK"
"area": "SE4"
"vat_multiplier": 1.25

Discovery returns GBP/1.0 hints in the API response but they are only used as frontend display hints — never persisted to settings.

Root Cause

_bootstrap_defaults() in settings_store.py unconditionally sets Swedish pricing defaults. The discovery endpoint returns locale-appropriate values (GBP, vat 1.0) as response hints for the frontend, but these are never written to the stored config unless the full wizard flow completes successfully — which it cannot due to the other bugs.

Fix

When discovery detects octopus_found=True and nordpool_found=False, bootstrap defaults should use UK-appropriate values (GBP, vat 1.0, no Swedish tax reduction). Alternatively, the wizard completion flow should always persist the locale hints from discovery.

Ref

Reported by @GraemeDBlue in #60. Depends on the provider persistence fix (#112).

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