diff --git a/templates/definition/meter/senec-home.yaml b/templates/definition/meter/senec-home.yaml index a4976b4b9..e4629483e 100644 --- a/templates/definition/meter/senec-home.yaml +++ b/templates/definition/meter/senec-home.yaml @@ -52,5 +52,30 @@ render: | jq: .ENERGY.GUI_BAT_DATA_FUEL_CHARGE | sub("fl_"; "") unpack: hex decode: float32 + batterymode: + source: switch + switch: + - case: 1 # normal + set: + source: http + uri: {{ .schema }}://{{ .host }}/lala.cgi + insecure: true + method: POST + headers: + - content-type: application/json + body: '{"ENERGY":{"SAFE_CHARGE_PROHIBIT":"u8_01"}}' # self consumption + - case: 2 # hold (not implemented) + set: + source: error + error: ErrNotAvailable + - case: 3 # charge + set: + source: http + uri: {{ .schema }}://{{ .host }}/lala.cgi + insecure: true + method: POST + headers: + - content-type: application/json + body: '{"ENERGY":{"SAFE_CHARGE_FORCE":"u8_01"}}' # force to charge capacity: {{ .capacity }} # kWh {{- end }}