- The configure intents to present devices that implement multiple usages in a single device or have linked templates and provide an easier step by step configuration experience e.g. by not asking for the same data for different usages over and over again
- Commit 880557594f changes this behaviour and now presents all devices that have multiple usages, e.g. meters that could be used as battery or pv meter
- This change introduces a new property `allineone` that should be used with the `usage` `param` the identify a device that implements multiple usages in the same device
- The filter to present these devices is extended by checking for this property
35 lines
897 B
YAML
35 lines
897 B
YAML
template: e3dc
|
|
products:
|
|
- brand: E3DC
|
|
params:
|
|
- name: usage
|
|
choice: ["grid", "pv", "battery"]
|
|
allinone: true
|
|
- name: host
|
|
- name: port
|
|
default: 502
|
|
render: |
|
|
type: custom
|
|
power:
|
|
source: modbus
|
|
uri: {{ .host }}:{{ .port }}
|
|
register: # manual register configuration for E3/DC "Simple-Mode"
|
|
type: holding
|
|
decode: int32s
|
|
{{- if eq .usage "grid" }}
|
|
address: 40073 # Hausverbrauchs-Leistung in Watt
|
|
{{- end}}
|
|
{{- if eq .usage "pv" }}
|
|
address: 40067 # Photovoltaikleistung in Watt
|
|
{{- end}}
|
|
{{- if eq .usage "battery" }}
|
|
address: 40069 # Batterie-Leistung in Watt
|
|
scale: -1 # reverse direction
|
|
soc:
|
|
source: modbus
|
|
uri: {{ .host }}:{{ .port }}
|
|
register: # manual register configuration for E3/DC "Simple-Mode"
|
|
address: 40082 # Batterie-SOC in Prozent
|
|
type: holding
|
|
decode: uint16
|
|
{{- end}}
|