From d264ec41c5e816c25fcf5e3189714eed1d1a8dc8 Mon Sep 17 00:00:00 2001 From: andig Date: Sun, 25 May 2025 22:56:35 +0200 Subject: [PATCH] Victron: fix query (#21444) --- templates/definition/tariff/victron.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/definition/tariff/victron.yaml b/templates/definition/tariff/victron.yaml index 84f6455c2..dc0c79830 100644 --- a/templates/definition/tariff/victron.yaml +++ b/templates/definition/tariff/victron.yaml @@ -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 }}"