From f0b6bc934e7650b02f19a706b8bdb6dbcb212964 Mon Sep 17 00:00:00 2001 From: fanatix <43752712+djfanatix@users.noreply.github.com> Date: Sat, 18 Oct 2025 10:29:54 +0200 Subject: [PATCH] Stekker: use 15min resolution for BE/NL (#24028) --- tariff/stekker.go | 16 ++++++++++++---- templates/definition/tariff/stekker.yaml | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tariff/stekker.go b/tariff/stekker.go index 654edbc7d..0159ca065 100644 --- a/tariff/stekker.go +++ b/tariff/stekker.go @@ -59,6 +59,13 @@ func NewStekkerFromConfig(other map[string]interface{}) (api.Tariff, error) { return nil, err } + switch cc.Region { + case "BE": + cc.Region = "BE-900" + case "NL": + cc.Region = "NL-900" + } + t := &Stekker{ embed: &cc.embed, region: cc.Region, @@ -75,7 +82,6 @@ func (t *Stekker) run(done chan error) { for tick := time.Tick(time.Hour); ; <-tick { url := fmt.Sprintf("%s?advanced_view=®ion=%s&unit=MWh", stekkerURI, t.region) - resp, err := client.Get(url) if err != nil { once.Do(func() { done <- err }) @@ -137,12 +143,14 @@ func (t *Stekker) run(done chan error) { continue } - start = start.UTC() - end := start.Add(time.Hour) + duration := time.Hour + if t.region == "BE" || t.region == "NL" { + duration = SlotDuration + } res = append(res, api.Rate{ Start: start, - End: end, + End: start.Add(duration), Value: t.totalPrice(yt/1000.0, start), // €/MWh → €/kWh }) } diff --git a/templates/definition/tariff/stekker.yaml b/templates/definition/tariff/stekker.yaml index a86288404..218c8d8c8 100644 --- a/templates/definition/tariff/stekker.yaml +++ b/templates/definition/tariff/stekker.yaml @@ -11,6 +11,9 @@ params: - name: region example: BE type: choice + required: true + description: + generic: Market region code choice: [ "DE-LU",