I have an irrigation controller that integrates with MQTT (it does not use MQTT discovery).
I would like to name my entities ‘binary_sensor.irrigation.’ - but HA seems to simply derive the entity name from the ‘name:’ field in the config resulting in “binary_sensor.veggie_garden”. The “name” field in the config seems to map to the “friendly_name” field in the UI. I’ve tried using “unique_id” but that does not seem to influence the entity name.
You set the entity_id using the name in the mqtt config. Then use Customize to add a friendly name. Keep in mind that friendly_names can be duplicated but entity_ids (and thus names in a domain) must be unique. So if you have two names (not friendly_names) that are the same then _2 will be appended to the entity_id.
I did something similar with some of my template sensors when I changed them to use the new format as I did not want to have to bother changing the entity ids in all my automations and scripts and I wanted the same name displayed in Lovelace (where I could have changed it too btw), e.g.
Thank you @tom_l, I came here looking for a solution to this issue of not being able to give a friendly name to mqtt entities and your trick using customize.yaml works!!
@beerygaz can you please mark @tom_l answer as the solution of your question so people can quickly see it when they visit this post?