Modular code, packages and templates?

I’m still figuring my way around, but have built a BLE sensor, been able to program Seeed Xaio + Expansion boards, and have a complex pool controller running ADC for temp, pressure and 4 relays - so not a noob per se. I’m using a package on all my device.yamls to do api, wifi, ota and a bunch text sensors (IP, MAC, etc).

It seems I should be able to make by base.yaml be a template that each device.yaml can configure so that similar sensors are named more explicitly.

e.g. ${part_mac} temp-sensor would be AABBCC Temp Sensor instead of ReallyLongDeviceName Temp Sensor

I think I’m just overlooking something or not finding the examples or doco.
My thinking is that I can use this approach to ensure all entities have an easily discernable name. My plan is to base on the right 6 of MAC address as I’ve labeled all my ESPs (I have a desk top full of about 20 I’m playing with)

Hope this makes sense.

This does not seem like a thread about configuring HASS, but about configuring ESPHome. You should change the tags so it ends up in the correct part of the forum.

This may help, it’s not a full guide but has pointers to other relevant docs.

Thanks. Sorry I missed that.