Skip to content

fix(prices): unset VAT is 25% in the store and 0% in the planner forecast #1154

Description

@frahlg

Unset VAT is 25% when prices are stored and 0% when the planner fills forecast slots. Overnight synthetic prices look cheaper than the published day-ahead and pull charging into the forecast tail.

Found on master 6eadec3f.

What happens

Harvester (go/internal/prices/prices.go):

vat := cfg.VATPercent
if vat == 0 {
    vat = 25
}

MPC wiring (go/cmd/ftw/main.go) copies raw cfg.Price.VATPercent (Go zero) into extendPricesWithForecast, which does total := (spot + gridTariff) * (1 + vatPct/100.0).

Published slots include 25% VAT. Forecast-extended slots do not. The planner sees a fake cheap tail after the day-ahead cutoff.

The same vat == 0 sentinel makes a real 0% VAT country impossible in the harvester while MPC would honor 0.

What a fix needs

  • One VAT default, used by both the store and MPC (including extendPricesWithForecast).
  • A distinct way to configure true 0% VAT (pointer, or a separate flag).
  • Test: unset vat_percent, stored TotalOreKwh vs forecast-filled slot totals must use the same factor.

Open PR overlap: #1044 / #1051 touch prices. If either already unifies VAT, close this as duplicate of that PR; do not patch prices.go out from under them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions