From 7a691fb8c7c09f5ace8bbb77d952377037dbbdf0 Mon Sep 17 00:00:00 2001 From: andig Date: Mon, 26 Feb 2024 08:59:35 +0100 Subject: [PATCH] Ohmpilot: make id configurable (BC) (#12475) --- templates/definition/meter/fronius-ohmpilot.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/templates/definition/meter/fronius-ohmpilot.yaml b/templates/definition/meter/fronius-ohmpilot.yaml index 19ceb0aba..959569566 100644 --- a/templates/definition/meter/fronius-ohmpilot.yaml +++ b/templates/definition/meter/fronius-ohmpilot.yaml @@ -7,13 +7,19 @@ params: - name: usage choice: ["aux"] - name: host + - name: key + description: + de: ID des Ohmpilot im SolarAPI + en: ID of the Ohmpilot in SolarAPI + default: 0 + advanced: true render: | type: custom power: source: http uri: http://{{ .host }}/solar_api/v1/GetPowerFlowRealtimeData.fcgi - jq: if .Body.Data.Smartloads.Ohmpilots."720896".P_AC_Total == null then 0 else .Body.Data.Smartloads.Ohmpilots."720896".P_AC_Total * -1 end + jq: if .Body.Data.Smartloads.Ohmpilots."{{ .key }}".P_AC_Total == null then 0 else .Body.Data.Smartloads.Ohmpilots."{{ .key }}".P_AC_Total * -1 end soc: source: http uri: http://{{ .host }}/solar_api/v1/GetPowerFlowRealtimeData.fcgi - jq: if .Body.Data.Smartloads.Ohmpilots."720896".Temperature == null then 0 else .Body.Data.Smartloads.Ohmpilots."720896".Temperature end + jq: if .Body.Data.Smartloads.Ohmpilots."{{ .key }}".Temperature == null then 0 else .Body.Data.Smartloads.Ohmpilots."{{ .key }}".Temperature end