diff --git a/templates/definition/meter/sunspec-hybrid.yaml b/templates/definition/meter/sunspec-hybrid.yaml index f16e02805..aecdec6a2 100644 --- a/templates/definition/meter/sunspec-hybrid.yaml +++ b/templates/definition/meter/sunspec-hybrid.yaml @@ -5,6 +5,7 @@ products: de: SunSpec Hybridwechselrichter en: SunSpec Hybrid Inverter group: generic +capabilities: ["curtail"] params: - name: usage choice: ["grid", "pv", "battery"] @@ -106,6 +107,33 @@ render: | {{- include "modbus" . | indent 6 }} value: 160:2:DCWH # mppt 2 scale: 0.001 + curtail: + source: sequence + set: + - source: sunspec + {{- include "modbus" . | indent 6 }} + value: 704:WMaxLimPct + - source: switch + switch: + - case: 100 # Uncurtailed + set: + source: const + value: 0 # Limit disabled + set: + source: sunspec + {{- include "modbus" . | indent 14 }} + value: 704:WMaxLimPctEna + default: + source: const + value: 1 # Limit enabled + set: + source: sunspec + {{- include "modbus" . | indent 10 }} + value: 704:WMaxLimPctEna + curtailed: + source: sunspec + {{- include "modbus" . | indent 2 }} + value: 704:WMaxLimPctEna maxacpower: {{ .maxacpower }} # W {{- end }} {{- if eq .usage "battery" }} diff --git a/templates/definition/meter/sunspec-inverter.yaml b/templates/definition/meter/sunspec-inverter.yaml index d3088c229..02894b8f3 100644 --- a/templates/definition/meter/sunspec-inverter.yaml +++ b/templates/definition/meter/sunspec-inverter.yaml @@ -4,6 +4,7 @@ products: de: SunSpec Wechselrichter en: SunSpec Inverter group: generic +capabilities: ["curtail"] params: - name: usage choice: ["grid", "pv", "battery"] @@ -153,6 +154,33 @@ render: | - 103:WH - 113:WH scale: 0.001 + curtail: + source: sequence + set: + - source: sunspec + {{- include "modbus" . | indent 6 }} + value: 704:WMaxLimPct + - source: switch + switch: + - case: 100 # Uncurtailed + set: + source: const + value: 0 # Limit disabled + set: + source: sunspec + {{- include "modbus" . | indent 14 }} + value: 704:WMaxLimPctEna + default: + source: const + value: 1 # Limit enabled + set: + source: sunspec + {{- include "modbus" . | indent 10 }} + value: 704:WMaxLimPctEna + curtailed: + source: sunspec + {{- include "modbus" . | indent 2 }} + value: 704:WMaxLimPctEna {{- end }} {{- if eq .usage "battery" }} power: