Skip to content

Commit

Permalink
Varta: add template without pv sensor (evcc-io#3281)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored Apr 30, 2022
1 parent ca96974 commit 013eda5
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 2 deletions.
43 changes: 43 additions & 0 deletions templates/definition/meter/varta-energiespeicher-battery-only.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
template: varta-energiespeicher-battery-only
products:
- brand: VARTA
description:
de: Energiespeicher (kein PV-Sensor)
en: Energiespeicher (without PV Sensor)
guidedsetup:
enable: true
params:
- name: usage
choice: ["grid", "battery"]
- name: host
- name: port
default: 502
render: |
type: custom
power:
source: modbus
uri: {{ .host }}:{{ .port }}
{{- if eq .usage "grid" }}
id: 255
register:
address: 1078 # grid power
type: input
decode: int16
scale: -1
{{- end }}
{{- if eq .usage "battery" }}
id: 255
register:
address: 1066 # active power
type: input
decode: int16
scale: -1
soc:
source: modbus
uri: {{ .host }}:{{ .port }}
id: 255
register:
address: 1068 # SOC
type: input
decode: int16
{{- end }}
3 changes: 2 additions & 1 deletion templates/definition/meter/varta-energiespeicher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ template: varta-energiespeicher
products:
- brand: VARTA
description:
generic: Energiespeicher
de: Energiespeicher (mit PV-Sensor)
en: Energiespeicher (with PV Sensor)
guidedsetup:
enable: true
params:
Expand Down
18 changes: 18 additions & 0 deletions templates/docs/meter/varta-energiespeicher-battery-only_0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
product:
brand: VARTA
description: Energiespeicher (kein PV-Sensor)
render:
- usage: grid
default: |
type: template
template: varta-energiespeicher-battery-only
usage: grid
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 502 # Port # Optional
- usage: battery
default: |
type: template
template: varta-energiespeicher-battery-only
usage: battery
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 502 # Port # Optional
2 changes: 1 addition & 1 deletion templates/docs/meter/varta-energiespeicher_0.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
product:
brand: VARTA
description: Energiespeicher
description: Energiespeicher (mit PV-Sensor)
render:
- usage: grid
default: |
Expand Down

0 comments on commit 013eda5

Please sign in to comment.