ESPhome friendly_name and entity_id relationship

So I’m a little confused by some of the documentation I’m seeing. I’m using the following in my ratgdo device yaml file

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: Garage Door Opener

To try to change the entity_id to something that’s more friendly like
cover.garage_door_opener_door
instead of
cover.ratgdov25i_<macsuffix>_door

Which based on what I’m reading from the esphome integration documentation is what I’m supposed to do, but the device entities are not using the friendly name. I’ve tried removing the ratgdo device and readding it thinking maybe it’s an initial configuration thing, but that’s not doing either.

Am I missing something obvious or is this something that just isn’t possible?

It should slugify the name (not the friendly name) and use that as the prefix for all entities. You show a variable for the device name; did you define that name under the substitutions: section?

This is how mine look when I use substitutions:

substitutions:
  devicename: gas-meter
  friendly_name: Gas Meter

esphome:
  name: $devicename
  friendly_name: $friendly_name

And when I define a sensor in the code and give it name: Rate then I will end up with an entity called sensor.gas_meter_rate

Only a little?
I am no expert, but here’s my observation. There is no relationship between name: and friendly_name:.

Changing a name or entity_id is darned near impossible.

However, there is some good news. In automations you can use the friendly_name and the GUI will usually find the right device.

This is what I’m using that seems to have been automaticaly created for me as part of using the esphome firmware on the ratgdo to add the device to homeassistant:

substitutions:
  name: ratgdov25i-1bc020
  #name: garage-door-opener
  friendly_name: Garage Door Opener
  #friendly_name: ratgdov2.5i 1bc020
packages:
  ratgdo.esphome: github://ratgdo/esphome-ratgdo/v25iboard.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

The commented out name/friendly_name are things I tried and none of them seem to do what I’m trying to achieve which is an entity ID that looks like
cover.garage_door_opener_door

I mean this ESPHome - Home Assistant seems pretty clear that’s the behavior that is supposed to happen right?

Hmm it looks like this

substitutions:
  name: garage-door-opener
  friendly_name: Garage Door Opener

Got me what I want. It has the side-effect that it uses the hostname garage-door-opener but that’s okay for my use case.