Skip to content

Port beta's multiplicative spot-price adjustment (spot_multiplier) to main #221

Description

@johanzander

Context

Split out from #218 (item 1). main's entsoe provider (#208) only supports the additive markup model as Nordpool ((spot + markup) * VAT + fees). Beta built out spot_multiplier / export_spot_multiplier fields to support contracts that scale the raw spot price instead (e.g. Belgian Luminus Dynamic: spot * 1.0175 + fees) * VAT, export spot * 1.018 + compensation). Without this, Luminus-style contract users get systematically wrong prices.

This has already been ported onto beta's reset history (bess-manager-beta v9.10.0b1) — that diff is a ready-made reference for porting to main.

Touches

  • core/bess/settings.py (PriceSettings.spot_multiplier/export_spot_multiplier)
  • core/bess/price_manager.py (_calculate_buy_price/_calculate_sell_price)
  • core/bess/battery_system_manager.py (wiring)
  • backend/api_dataclasses.py
  • backend/api.py (_PROVIDER_PRICING_DEFAULTS / _pricing_defaults_for_discovery)
  • frontend/src/components/settings/PricingFormSection.tsx (provider-aware form + help text)
  • frontend/src/pages/SetupWizardPage.tsx
  • frontend/src/pages/SettingsPage.tsx

Note

#218 items 2 and 3 (setup wizard silently dropping spotMultiplier/exportSpotMultiplier, and Solcast entity-registry detection) are being fixed independently in a separate PR. Once this feature lands, double check the _PRICE_MAP allow-list in backend/api.py's setup_complete() includes the new fields (the contract test pattern from beta's TestPriceModelAttrsConsistency in backend/tests/test_settings_contracts.py is a good reference to prevent this class of bug recurring).

Related: #126, #218

Metadata

Metadata

Assignees

No one assigned

    Labels

    bot-analyzedTriage bot has processed this issueenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions