diff --git a/templates/definition/meter/growatt-hybrid-tlxh.yaml b/templates/definition/meter/growatt-hybrid-tlxh.yaml index f35adc668..8d4fe07a1 100644 --- a/templates/definition/meter/growatt-hybrid-tlxh.yaml +++ b/templates/definition/meter/growatt-hybrid-tlxh.yaml @@ -100,14 +100,6 @@ render: | type: input decode: uint32 scale: -0.1 - soc: - source: modbus - {{- include "modbus" . | indent 2 }} - register: - address: 3171 # SOC - type: input - decode: uint16 - capacity: {{ .capacity }} # kWh energy: source: modbus {{- include "modbus" . | indent 2 }} @@ -116,4 +108,12 @@ render: | type: input decode: uint32 scale: 0.1 + soc: + source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 3171 # SOC + type: input + decode: uint16 + capacity: {{ .capacity }} # kWh {{- end }} diff --git a/templates/definition/meter/growatt-hybrid.yaml b/templates/definition/meter/growatt-hybrid.yaml index 2aa8f56f8..5af2707ba 100644 --- a/templates/definition/meter/growatt-hybrid.yaml +++ b/templates/definition/meter/growatt-hybrid.yaml @@ -27,8 +27,8 @@ params: advanced: true render: | type: custom - power: {{- if eq .usage "grid" }} + power: source: calc add: - source: modbus @@ -55,6 +55,7 @@ render: | scale: 0.1 {{- end }} {{- if eq .usage "pv" }} + power: source: modbus {{- include "modbus" . | indent 2 }} register: # manual non-sunspec register configuration @@ -72,6 +73,7 @@ render: | scale: 0.1 {{- end }} {{- if eq .usage "battery" }} + power: source: calc add: - source: modbus @@ -88,14 +90,6 @@ render: | type: input decode: uint32 scale: -0.1 - soc: - source: modbus - {{- include "modbus" . | indent 2 }} - register: # manual non-sunspec register configuration - address: 1014 # SOC - type: input - decode: uint16 - capacity: {{ .capacity }} # kWh energy: source: modbus {{- include "modbus" . | indent 2 }} @@ -104,7 +98,13 @@ render: | type: input decode: uint32 scale: 0.1 - {{- end }} + soc: + source: modbus + {{- include "modbus" . | indent 2 }} + register: # manual non-sunspec register configuration + address: 1014 # SOC + type: input + decode: uint16 batterymode: source: switch switch: @@ -174,3 +174,5 @@ render: | address: 1092 type: writemultiple decode: uint16 + capacity: {{ .capacity }} # kWh + {{- end }}