Tariff: make Energy Price Forecast cacheable (#33049)

This commit is contained in:
Hendrik 2026-08-21 14:46:19 +02:00 • committed by GitHub
parent a8c4dfd372
commit 9600fc5b9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -31,7 +31,7 @@ params:
render: |
type: custom
{{ include "base" . }}
{{ include "features" . }}
{{ include "features" (merge (dict "basefeatures" (list "cacheable")) .) }}
forecast:
source: http
uri: https://api.energypriceforecast.eu/api/v1/evcc/tariff?country={{.region}}&type=grid&currency={{.currency}}&hours={{.horizon}}

View file

@ -1,5 +1,11 @@
{{ define "features" }}
{{- if or .basefeatures (eq .average "true") }}
features:
{{- range .basefeatures }}
- {{ . }}
{{- end }}
{{- if eq .average "true" }}
features: ["average"]
- average
{{- end }}
{{- end }}
{{- end }}