Kostal Pico MP: add grid (#29077)
This commit is contained in:
parent
db11f1d7c5
commit
4b9474481a
1 changed files with 7 additions and 2 deletions
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue