Blueprinting of configuration.yaml

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.

Hello KrzysztofHajdamowicz,

I have not tried this directly in the configuration.yaml, but I believe it will work. Now not blueprint because there is nothing in core or even in a roadmap to do what you say. I won’t say it’s impossible but I also won’t say that it’s impossible for me to live on Mars, but in truth it’s not going to happen.

What you should be able to do is YAML Anchors