So I’ve been adding the “friendly_name” option into my configurations so I can try to pass a better name over to Home Assistant but it’s behaving in a very strange manner and I can’t seem to get things to act the way I want.
Ultimately, it looks like when you add the friendly name into the configuration I can see it’s being automatically prefixed to the entity name in Home Assistant and it is also added to the entity ID itself.
For example, when I have:
esphome:
name: ${device_name}
friendly_name: ${friendly_name}
and then I have a binary sensor as follows:
binary_sensor:
- platform: template
name: ${friendly_name} Single Click
id: ${ha_name}_single_click
Home Assistant names with an additional prefix so it looks like
${friendly_name} ${friendly_name} Single Click
and it has the entity ID prefixed as
binary_sensor.${friendly_name}_single_click
but if I change things to exclude the friendly name from the sensor:
binary_sensor:
- platform: template
name: Single Click
id: ${ha_name}_single_click
Then the friendly name isn’t double prefixed in the sensor’s name but it also means that the entity ID itself loses the friendly name. What this means is that things look like this:
{friendly_name} Single Click
and the sensor has no prefix.
binary_sensor.single_click
Ultimately I would like the friendly name to prefix the entity name ONCE and the entity ID. Is there something that I’m missing? How is “friendly name” supposed to behave? The docs are pretty general:
friendly_name (Optional, string): This name is sent to the frontends. It is used by Home Assistant as the integration name, device name, and is automatically prefixed to entities where necessary.
I’ve ruined all of my entities and names for the time being so it would be nice to get this fixed