Substitution feature in Home Assistant

Hi,

I have flashed several devices with ESPHome and find the substitution feature to be very handy in reusing a code block.

Here is an example of one of many sonoff basic relays I have:
SonoffBasic08.yaml which is reusing code block

basic.yaml

This makes updating code really a breeze and less error prone.

Does it make sense to have similar substitution feature in Home Assistant?

Thanks.