Skip to content

Commit

Permalink
chore: simplify (evcc-io#17641)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored Dec 7, 2024
1 parent 341f17e commit 02e502a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions templates/definition/tariff/energy-charts-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 02e502a

Please sign in to comment.