From 4b9474481a28fb64d27d3679541e62736caa5d89 Mon Sep 17 00:00:00 2001 From: andig Date: Mon, 13 Apr 2026 13:55:07 +0200 Subject: [PATCH] Kostal Pico MP: add grid (#29077) --- templates/definition/meter/kostal-piko-mp-plus.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/definition/meter/kostal-piko-mp-plus.yaml b/templates/definition/meter/kostal-piko-mp-plus.yaml index a279ba79b..13be22a84 100644 --- a/templates/definition/meter/kostal-piko-mp-plus.yaml +++ b/templates/definition/meter/kostal-piko-mp-plus.yaml @@ -8,14 +8,19 @@ products: generic: coolcept fleX params: - name: usage - choice: ["pv"] + choice: ["grid", "pv"] - name: host render: | type: custom power: {{- if eq .usage "pv" }} - # PV source: http uri: http://{{ .host }}/measurements.xml jq: .root.Device.Measurements.Measurement[] | select(.attrType == "AC_Power") | if has ("attrValue") then .attrValue else "0" end | tonumber {{- end }} + {{- if eq .usage "grid" }} + source: http + uri: http://{{ .host }}/measurements.xml + jq: .root.Device.Measurements.Measurement[] | select(.attrType == "GridPower") | if has ("attrValue") then .attrValue else "0" end | tonumber + scale: -1 + {{- end }}