evcc-io/templates/definition/tariff/allinpower.yaml

22 lines
590 B
YAML

template: allinpower
deprecated: true
products:
- brand: All in Power
requirements:
evcc: ["skiptest"]
group: price
countries: ["NL"]
params:
- preset: tariff-base
render: |
type: custom
{{ include "base" . }}
forecast:
source: http
uri: https://api.allinpower.nl/troodon/api/p/spot_market/prices/?product_type=ELK
jq: |
[.timestamps, .prices] | transpose | map({
"start": .[0] | strptime("%FT%T.%f%z") | strftime("%FT%TZ"),
"end": .[0] | strptime("%FT%T.%f%z") | mktime + 3600 | strftime("%FT%TZ"),
"value": .[1]
}) | tostring