Tariff: make Energy Price Forecast cacheable (#33049)
This commit is contained in:
parent
a8c4dfd372
commit
9600fc5b9f
2 changed files with 8 additions and 2 deletions
|
|
@ -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¤cy={{.currency}}&hours={{.horizon}}
|
||||
|
|
|
|||
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue