chore: simplify (#17641)

This commit is contained in:
andig 2024-12-07 19:01:26 +01:00 • committed by GitHub
parent 341f17ee0b
commit 02e502a894
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,5 +40,10 @@ render: |
{{ include "tariff-base" . }}
forecast:
source: http
uri: https://api.energy-charts.info/price?bzn={{ .bzn }}&end={{"{{"}} now | dateModify "+24h" | date "2006-01-02" {{"}}"}}
jq: '[.unix_seconds, .price] | transpose | map({ "start": (.[0] | todate), "end": ((.[0]+3600) | todate), "price": (.[1]/1000)}) | tostring'
uri: https://api.energy-charts.info/price?bzn={{ .bzn }}&end={{ `{{ addDate now 0 0 1 | date "2006-01-02" }}` }}
jq: |
[.unix_seconds, .price] | transpose | map({
"start": .[0] | todate,
"end": .[0]+3600 | todate,
"price": .[1]/1000
}) | tostring