Victron: fix query (#21444)

This commit is contained in:
andig 2025-05-25 22:56:35 +02:00 • committed by GitHub
parent af65445e2f
commit d264ec41c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,13 +37,11 @@ params:
default: 1h
advanced: true
render: |
{{- $start := now | unixEpoch | int -}}
{{- $end := add $start 172800 -}}
type: custom
tariff: solar
forecast:
source: http
uri: "https://vrmapi.victronenergy.com/v2/installations/{{ .idsite }}/stats?start={{ $start }}&end={{ $end }}&interval=hours&type=forecast"
uri: https://vrmapi.victronenergy.com/v2/installations/{{ .idsite }}/stats?start={{ `{{ now | unixEpoch | int }}` }}&end={{ `{{ add (now | unixEpoch | int) 172800 }}` }}&interval=hours&type=forecast
method: "GET"
headers:
- X-Authorization: "Token {{ .token }}"