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.
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):MPC wiring (
go/cmd/ftw/main.go) copies rawcfg.Price.VATPercent(Go zero) intoextendPricesWithForecast, which doestotal := (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 == 0sentinel makes a real 0% VAT country impossible in the harvester while MPC would honor 0.What a fix needs
extendPricesWithForecast).vat_percent, storedTotalOreKwhvs 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.goout from under them.