Energinet: use 15m slots (#23986)

This commit is contained in:
HolgerMiara 2025-10-03 17:25:37 +02:00 • committed by GitHub
parent 148aa76b67
commit b2ca1f4c18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,15 +17,22 @@ render: |
{{ include "tariff-base" . }}
forecast:
source: http
uri: https://api.energidataservice.dk/dataset/Elspotprices?filter={"PriceArea":["{{ .region }}"]}
uri: https://api.energidataservice.dk/dataset/DayAheadPrices?start=now&filter={"PriceArea":["{{ .region }}"]}
jq: |
[.records[] |
{
start: (.HourUTC[0:13] + ":00:00Z"),
end: (.HourUTC[0:13]
| strptime("%Y-%m-%dT%H")
| mktime + 3600
[.records[]
| {
start: (.TimeUTC[0:13] + ":00:00Z"),
end: (.TimeUTC[0:13]
| strptime("%Y-%m-%dT%H")
| mktime + 3600
| strftime("%Y-%m-%dT%H:%M:%SZ")),
value: .SpotPriceDKK / 1e3
value: .DayAheadPriceDKK / 1e3
}
] | tostring
]
| group_by(.start)
| map({
start: .[0].start,
end: .[0].end,
value: (map(.value) | add / length)
})
| tostring