Hello, I need some help from you experts. I have an E3DC home power station and I would like to include that in the energy dashboard. For this I have set the following reference in the configuration.yaml: modbus: !include services/e3dc.yaml
In the file itself, I’d like to include the below, but HA keeps giving me errors when doing a configuration check.
modbus:
name: e3dc
type: tcp
host: xxx.xxx.xxx.xxx
port: 502
sensor:
- platform: template
sensors:
e3dc_netzeinspeisung:
friendly_name: e3dc Netzeinspeisung
unique_id: e3dc_netzeinspeisung
unit_of_measurement: ‘W’
value_template: >
{% if states(“sensor.e3dc_net_power”) | int < 0 -%}
{{ states(“sensor.e3dc_net_power”) | int}}
{%- else -%}
0
{%- endif %}
e3dc_netzbezug:
friendly_name: e3dc Netzeinspeisung
unique_id: e3dc_netzbezug
unit_of_measurement: ‘W’
value_template: >
{% if states(“sensor.e3dc_net_power”) | int > 0 -%}
{{ states(“sensor.e3dc_net_power”) | int}}
{%- else -%}
0
{%- endif %}
e3dc_emergency_power:
unique_id: e3dc_emergency_power
value_template: >
{% set eep = states(‘sensor.e3dc_emergency_power_modb’) %}
{% if eep == ‘0’ %}
nicht unterstützt
{% elif eep == ‘1’ %}
aktiv
{% elif eep == ‘2’ %}
inaktiv
{% elif eep == ‘3’ %}
nicht verfügbar
{% elif eep == ‘4’ %}
falsche Position 1K04
{% else %}
unbekannt
{% endif %} - platform: modbus
scan_interval: 60
registers:- name: E3DC EMS State
register: 40084
data_type: uint
hub: e3dc - name: E3DC S10 ModBus ID
register: 40000
data_type: uint
hub: e3dc - name: E3DC PV1 Power
unit_of_measurement: ‘W’
register: 40067
count: 2
reverse_order: true
hub: e3dc
#data_type: custom
#structure: “>l” - name: E3DC PV2 Power
unit_of_measurement: ‘W’
register: 40075
count: 2
reverse_order: true
scale: -1
hub: e3dc
#data_type: custom
#structure: “>l” - name: E3DC House Power
unit_of_measurement: ‘W’
register: 40071
count: 2
reverse_order: true
hub: e3dc
#data_type: custom
#structure: “>l” - name: E3DC Net Power
unit_of_measurement: ‘W’
register: 40073
count: 2
reverse_order: true
hub: e3dc
#data_type: custom
#structure: “>l” - name: E3DC Battery Power
unit_of_measurement: ‘W’
register: 40069
count: 2
reverse_order: true
hub: e3dc
#data_type: custom
#structure: “>l” - name: E3DC Battery Percent
unit_of_measurement: ‘%’
register: 40082
data_type: uint
hub: e3dc - name: E3DC Selfpower
unit_of_measurement: ‘%’
register: 40081
data_type: custom
structure: “xB”
hub: e3dc - name: E3DC Autarki
unit_of_measurement: ‘%’
register: 40081
data_type: custom
structure: “Bx”
hub: e3dc - name: E3DC Emergency Power MODB
register: 40083
data_type: uint
hub: e3dc
Error Message:
- name: E3DC EMS State
Invalid config for [modbus]: extra keys not allowed @ data[‘modbus’][0][‘host’]. Got None
extra keys not allowed @ data[‘modbus’][0][‘sensor’]. Got None
not a valid value for dictionary value @ data[‘modbus’][0][‘type’]. Got None
required key not provided @ data[‘modbus’][0][‘baudrate’]. Got None
required key not provided @ data[‘modbus’][0][‘bytesize’]. Got None
required key not provided @ data[‘modbus’][0][‘method’]. Got None
required key not provided @ data[‘modbus’][0][‘parity’]. Got None
required key not provided @ data[‘modbus’][0][‘stopbits’]. Got None. (See /config/configuration.yaml, line 28).
Can someone help me to adjust this so that it works? Or maybe give me tips on how best to customize E3DC over Modbus to correctly map the desired HA Engie dashboard values (grid consumption, back to grid, solar production via two solar arrays, battery in and out).
thank you very much