diff --git a/templates/definition/meter/saj-h1.yaml b/templates/definition/meter/saj-h1.yaml index 54441a2ed3..aca2c7dc07 100644 --- a/templates/definition/meter/saj-h1.yaml +++ b/templates/definition/meter/saj-h1.yaml @@ -5,13 +5,30 @@ products: generic: H1 Series Hybrid Solar Inverter params: - name: usage - choice: ["pv", "battery"] + choice: ["grid", "pv", "battery"] - name: modbus choice: ["tcpip"] - name: capacity advanced: true render: | type: custom + {{- if eq .usage "grid" }} + power: + source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 0x40A1 # SmartMeterTotalGridPowerWatt (undocumented) + type: holding + decode: int16 + energy: + source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 0x40FD # Total_FeedInEnergy + type: holding + decode: uint32 + scale: 0.01 + {{- end }} {{- if eq .usage "pv" }} power: source: modbus