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 }}