Substitution not working for HA

Hi!
I’m using sibstitutions, but It’s working only in ESPHome and validator, I can’t get the names in Home Assistant. What am I doing wrong?

substitutions:
  hostname: 'sensores-01'
  device_name: sensores-01
  device_alt_name: sensores_01
  device_full_name: "Sensores 01"

esphome:
  name: ${device_name}  

(...)
sensor:

  - platform: dallas_temp
    address: 0x823c01f095ac4a28
    id: ${device_alt_name}_temperatura
    name: "${device_alt_name} - Temperatura"
    device_class: "temperature"
    state_class: "measurement"

Validator seens to be OK


but in home assistant, I just got everything after the dash, no substitution at all

Have you tried removing the device from the ESPHome integration (NOT the builder add-on) and re-discovering it?

Yep, same problem.
Also tried creating a new device from scratch, same problem.

“name” will add MAC address by default

name_add_mac_suffix (Optional, boolean): Appends the last 3 bytes of the mac address of the device to the name in the form <name>-aabbcc. Defaults to false. See Adding the MAC address as a suffix to the device name.

I think you also want friendly_name
docs


friendly_name (Optional, string): This name is sent to the frontend and used by Home Assistant as the integration and device name. It also gets prefixed to entity names when needed. While optional, leaving it out can result in less intuitive names and a less polished experience in Home Assistant. Setting a friendly_name helps keep things clear, consistent, and easier to manage.

EDIT
Removing quotes may fix sensor names

I think on the device page HA hides the portion of the sensor name that is a match to the device name. If you look at the sensor in other place, I believe you’ll see the full name.

You are right!
Doesn’t make sense to me, but it’s right!