Configureable name/friendly name

Is there a way to change some sort of a TEXT template from Home Assistant (similar like how you can make a Number template, for configurable values) that is next used by the ESPHome?

Ideally I would use it to configure name and friendly name, so I can have multiple similar devices, without having to compile each one.

The process would be:

  • Apply standard firmware.bin with generic name
    – it would register itself with that generic name, and sensor ID’s with that generic prefix

  • Reconfigure new name and friendly name

  • Delete the device from Home Assistant

  • Rediscover the device from Home Assistant
    – it would now register itself with the new custom name and sensor ID’s with that new prefix

I cannot figure out how to do this, as I cannot find any “Template Text” similar to “Template Number”

Or

?