39 lines
960 B
YAML
39 lines
960 B
YAML
template: powerdog
|
|
products:
|
|
- description:
|
|
generic: Powerdog
|
|
guidedsetup:
|
|
enable: true
|
|
params:
|
|
- name: usage
|
|
choice: ["grid", "pv"]
|
|
- name: modbus
|
|
choice: ["tcpip"]
|
|
render: |
|
|
type: custom
|
|
power:
|
|
{{- if eq .usage "grid" }}
|
|
source: calc #calculate current overall consumption + (current pv effort * (-1) )
|
|
add:
|
|
- source: modbus
|
|
{{ include "modbus" . | indent 4 }}
|
|
register:
|
|
address: 40026 #register for overall consumption
|
|
type: holding
|
|
decode: int32
|
|
- source: modbus
|
|
{{ include "modbus" . | indent 4 }}
|
|
register:
|
|
address: 40002 #register for pv effort
|
|
type: holding
|
|
decode: int32
|
|
scale: -1 #scale with -1 to get a substraction
|
|
{{- end }}
|
|
{{- if eq .usage "pv" }}
|
|
source: modbus
|
|
{{ include "modbus" . | indent 2 }}
|
|
register:
|
|
address: 40002 #register for pv effort
|
|
type: holding
|
|
decode: int32
|
|
{{- end }}
|