From ee398fe6ad607bf3cde572158e5d5adfbc9efa20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ante=20Karamati=C4=87?= Date: Sun, 13 Oct 2024 09:47:00 +0200 Subject: [PATCH] Enphase: add inverters (#16625) Return max value from two sources of production information. This allows using metering provided by either CTs or inverters, while before this commit only CT values were used. --- templates/definition/meter/enphase.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/definition/meter/enphase.yaml b/templates/definition/meter/enphase.yaml index 1b646cb24..12b497ad0 100644 --- a/templates/definition/meter/enphase.yaml +++ b/templates/definition/meter/enphase.yaml @@ -41,7 +41,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: .production[] | select(.measurementType == "production").wNow + jq: .production | max_by(.wNow).wNow energy: source: http uri: http://{{ .host }}/production.json @@ -51,7 +51,7 @@ render: | password: {{ .token }} insecure: true {{- end }} - jq: .production[] | select(.measurementType == "production").whLifetime + jq: .production | max_by(.wNow).whLifetime scale: 0.001 {{- end }} {{- if eq .usage "battery" }}