esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
404 stars 26 forks source link

Add option to not prepend friendly_name to Home Assistant entities #2732

Open DrBlokmeister opened 1 month ago

DrBlokmeister commented 1 month ago

Describe the problem you have/What new integration you would like

When adding a friendly_name to a device, this name is displayed in the ESPHome dashboard, improving user friendliness. However, this also prepends the friendly_name to entities in Home Assistant. When using a configuration like:

substitutions:
  device_name: "Plug Electric Car"

esphome:
  friendly_name: ${device_name}

sensor:
  - platform: total_daily_energy
    name: "${device_name} Energy Today"
    power_id: "power"

Home Assistant will add the entity sensor.plug_electric_car_plug_electric_car_energy_today, which is unwanted.

It would be nice if we got the option to disable prepending of the friendly_name to any entities in Home Assistant.

Please describe your use case for this integration and alternatives you've tried:

Currently two options are available:

Additional context

I was a bit unsure if this is an ESPHome feature request or a Home Assistant feature request. If I'm in the wrong category, please let me know.

paravoid commented 2 weeks ago

+1 this is kind of annoying :) Also see #2476 and in particular https://github.com/esphome/feature-requests/issues/2476#issuecomment-1844034117 which I believe is describing the same issue (although I find your example quite helpful in describing this too).