chore: simplify (#26419)

This commit is contained in:
andig 2026-01-04 17:05:23 +01:00 • committed by GitHub
parent dc9ff1d6c3
commit da7ec0ad45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,6 +34,8 @@ params:
de: https://www.solaxcloud.com/ -> Gerät -> Wechselrichter (neue Website) oder Support (alte Website), Wert von Registrierungsnummer hier eintragen
en: https://www.solaxcloud.com/ -> Device -> Inverter (new site) or Support (old site), use the registration number
- preset: battery-params
- name: cache
default: 1s
render: |
type: custom
power:
@ -41,33 +43,25 @@ render: |
source: http
uri: https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?tokenId={{ unquote .tokenid }}&sn={{ unquote .serial }}
jq: .result.feedinpower
cache: 2m30s
cache: {{ .cache }}
scale: -1
{{- end }}
{{- if eq .usage "pv" }}
source: calc
add:
# Hybrid WR XXXXXXXXXXXXXX
# DC MPPT1 + MPPT2
- source: http
uri: https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?tokenId={{ unquote .tokenid }}&sn={{ unquote .serial }}
jq: .result.powerdc1 # Solax API Inverter.DC.PV.power.MPPT1
cache: 2m30s
- source: http
uri: https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?tokenId={{ unquote .tokenid }}&sn={{ unquote .serial }}
jq: .result.powerdc2 # Solax API Inverter.DC.PV.power.MPPT2
cache: 2m30s
source: http
uri: https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?tokenId={{ unquote .tokenid }}&sn={{ unquote .serial }}
jq: (.result.powerdc1 // 0)+(.result.powerdc2 // 0) # Solax API Inverter.DC.PV.power.MPPT1+MPPT2
cache: {{ .cache }}
{{- end }}
{{- if eq .usage "battery" }}
source: http
uri: https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?tokenId={{ unquote .tokenid }}&sn={{ unquote .serial }}
jq: .result.batPower # Solax API inverter.DC.battery.power.total
scale: -1
cache: 2m30s
cache: {{ .cache }}
soc:
source: http
uri: https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?tokenId={{ unquote .tokenid }}&sn={{ unquote .serial }}
jq: .result.soc # Solax API inverter.DC.battery.energy.SOC
cache: 2m30s
cache: {{ .cache }}
{{- include "battery-params" . }}
{{- end }}