Use-case scenario:
Imagine you are a numberphile nerd that have a fleet of Eastron SDM630 utility meters, one for each circuit in utility panel.
To configure modbus
integration between HA and meter, you have to edit configuration.yaml
and describe EACH entity and there is many of them:
Now imagine you are having 8 or 10 of them, each with identical configuration except slave
id in each entity.
That’s why I am interested in blueprinting of configuration.yaml
sections, roughly looking like:
modbus:
- blueprint: modbus/sdm630.yaml
variables:
meter_name: "Lighting circuit"
slave: 136
and modbus/sdm630.yaml
roughly looking like:
modbus:
# SDM630 PowerMeter
- name: eastron
type: rtuovertcp
host: 10.0.0.28
port: 502
retry_on_empty: true
close_comm_on_error: false
retries: 10
timeout: 15
delay: 2
sensors:
- name: ${var:name} Phase 1 line to neutral volts
unique_id: ${var:name}_l1_neutral_volts
count: 2
data_type: float32
precision: 2
address: 0
input_type: input
slave: ${var:slave}
unit_of_measurement: V
state_class: measurement
device_class: voltage
ESPHome currently have such idea implemented so creating few devices with nearly-identical configuration is like including a package and setting substitutions.