Stekker: use 15min resolution for BE/NL (#24028)
This commit is contained in:
parent
40713a924a
commit
f0b6bc934e
2 changed files with 15 additions and 4 deletions
|
|
@ -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
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ params:
|
|||
- name: region
|
||||
example: BE
|
||||
type: choice
|
||||
required: true
|
||||
description:
|
||||
generic: Market region code
|
||||
choice:
|
||||
[
|
||||
"DE-LU",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue