From 1af4c0ae77b365f5e400a9d913cf7d01f7a39c4c Mon Sep 17 00:00:00 2001 From: andig Date: Mon, 9 Sep 2024 13:44:58 +0200 Subject: [PATCH] chore: minor cleanup --- .../definition/meter/deye-hybrid-3p.yaml | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/templates/definition/meter/deye-hybrid-3p.yaml b/templates/definition/meter/deye-hybrid-3p.yaml index d2994f49f..2e6f907c6 100644 --- a/templates/definition/meter/deye-hybrid-3p.yaml +++ b/templates/definition/meter/deye-hybrid-3p.yaml @@ -110,6 +110,14 @@ render: | address: 590 # "Battery output power" type: holding decode: int16 + energy: + source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 518 # "Total discharge of the battery (Wh)" + type: holding + decode: uint32s + scale: 0.1 soc: source: modbus {{- include "modbus" . | indent 2 }} @@ -240,17 +248,7 @@ render: | address: 172 type: writemultiple decode: int32s - minsoc: {{.minsoc}} - maxsoc: {{.maxsoc}} - {{- if .capacity }} + minsoc: {{ .minsoc }} + maxsoc: {{ .maxsoc }} capacity: {{ .capacity }} # kWh {{- end }} - energy: - source: modbus - {{- include "modbus" . | indent 2 }} - register: - address: 518 # "Total discharge of the battery (Wh)" - type: holding - decode: uint32s - scale: 0.1 - {{- end }}