I use KNX and while defining entities in Yaml I can set the name, which is more the entity_id if you like to have a clean definition, but not a friendly_name.
For the latter I have to use the customization functionality and yes, I can bundle it with packages but even that is a bit annoying.
To be honest this very simple use case to set the entity_id AND friendly_name for KNX did me a lot of headache when I first began to experiment with Home Assistant. In my opinion every integration that allows a yaml definition of entities must support setting the basic values of the entities like entity_id and friendly_name. And btw, why can’t I define the room anywhere in Yaml?
To make my case especially clear: simply setting the name does not work, because German Umlauts make it really unreadable. Example:
Kitchen in German is „Küche“ and something like „Küche Licht Tür“ as name will be taken as the friendly_name, which is fine, but the entity_id will be „kuche_licht_tur“, which is annoying to read and manage.
Both, friendly_name and entity_id, are meant to be changeable from UI.
Since user created yaml is never changed from HA the name key is only used for initializing the entity (at least for Knx).
I’d set a proper name - with umlauts etc. - and change the entity_id from UI if you so desire.
The thing is that the UI is much more work if you already have dozens of devices or entities defined in yaml files.
This is related a bit to the request to define unique_id.
Basically it is unclear to me also why there are some integrations that allow the user to define everything in the yaml and why some do not allow you to set friendly_name or unique_id or area.
Imho that’s mainly “political”. Integrations are not allowed to set unique_id in yaml (or by users).
Some few have exceptions for that rule ie. when there is no way to find a proper unique_id - like for templates - so they can be assigned to areas, set icons etc. from UI
I don’t know of any integration that is allowed to set an area from yaml (but then again I don’t know that many at all ).
All in all there is a preference in HA to auto-discover things and manage from UI over Yaml wherever possible.
Unfortunately many things are not auto discovered. Especially via MQTT.
MQTT sensors are one of the examples where somebody wanted to allow the user to define the area but then made it into a “suggested_area” rather than forcing it.