-
-
Notifications
You must be signed in to change notification settings - Fork 28
Add option to remove the prefixing of "friendly_name" since this affects the voice assistant #2476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The purpose is incredibly useful to me. I have several of the same device type, like an s31 relay for example, and I use templates to mange the configuration. So in my template I can have something simple like I depend on this, and if it is optional it should be opt-out, except in one case. In the case of an empty name like |
I have no problem with the opt-out function, but it should not be forced, because it does not fit all the use cases. |
First, let me say I hate the whole concept of the automatically prefixed friendly name, and it was absolutely the most disruptive rollout of anything I have encountered in HA in many years of using it. I think many of us use various tricks to work around it (e.g. using name with a single space as opposed to empty strings). That said, I think some care has to be taken in changing it yet again. The other thing that has happened is 3rd parties have rolled out very useful (and widely used) git based implementations, which make it more complicated to change THEIR code (e.g. forking and merging updates -- and HA thinks YAML is hard to edit!). For example, I personally would like to see any such control over whether or not to prefix be locally controlled, and by that I mean in different parts of the same esphome program. If I have includes from GIT, and local includes of my own standard code in the same file, being able to have some kind of pragma declaration might work, where one is #PREFIX OFF and #PREFIX ON (clearly not that syntax, just as an example) that has a respected scope. But please... stop breaking existing code for this. It was a royal mess most have gotten past, I am sure it was well intentioned but it was a mess. Don't make another with trying to add more lipstick to this pig. |
This change has affected Voice Assistant, Automations, Scripts, and Dashboards. |
I have this issue too. My most common use case is when I create devices in ESPHome that can be turned on or off, or opened and closed. I am modifying the default YAML of the ratgdo and since my ratgo is called "Overhead Garage Door", I do not want anything added to the entity name... in other words it must match the device name. I have tried a few things: name: None (does not work, I just get "none" as a name) My end goal is for the cover entity that controls the "Overhead Garage Door" to be called Summary: What @clinta said sounds perfect - #2476 (comment) Edit: Other case I just found. I modified my ratgdo to turn on/off a parking laser. Sometimes I need to turn it on/off manually (mostly verbally via Alexa in the car). Giving the entity a name of "Parking Laser" resulted in an entitiy name of |
You can overwrite (change) the entity ID in 'Developer Tools -> States page' by finding the entity, clicking on the 'i' icon (more information) and then in the pop-up window click the sprocket icon. Change the entity ID and confirm by clicking 'Update' in the left bottom corner of this pop-up window. |
@kooswillem I rename my entities frequently and do so simply by clicking on its name, then clicking the cog wheel which opens a window where you can edit both the name and entity name however I try to create ESPHome devices that don't require it by default. Before the naming was 'automated' I had full control of it and could make it work exactly as desired, now I can't (see issue described above) |
You should avoid doing that on long term and with many entities. If for any reason in the future you need to remove and re-add the ESPHome node to HA, you'll have to do the renames again manually, for all your automations and data history to be functional again. |
@alexruffell wrote:
This should work - I'd suggest filing a separate bug report (not feature request) just for this. |
With specifying For background discussion on that, see: |
I'm also really surprised that this change was suddenly rolled out and I find that all my ESPHome sensors now are named something like sensor.plug_nas_plug_nas_power, instead of sensor.plug_nas_power and I would need to manually modify around 20 sensors per device. Please give us the option to remove prefixing of friendly_name! |
I found this thread while looking for a solution to this issue and discovered that if you use a space for the friendly name, it get's recognized as a valid prefix, but the whitespace gets trimmed from the entity name automatically,
This config automatically generated an entity with the name "TV Power On" in my list of Entities. Notably, this won't work if you provide a completely empty string: "" |
The blank space works for the individual entity, but it defeats the purpose of the friendly name, which is to name the node. |
@rarroyo6 did you intend to close this? |
@rarroyo6 please re-open the issue as it has not been solved yet AFAIK. |
Sorry about that, I accidentally clicked on the submit and close button. |
Is this on any roadmap? I have had to stop using friendly name altogether. This gives a slightly less appealing esphome dashboard without capital letters and spaces in names, but at least I get usable entity names. For any device with more than one entity I find this to be an absolute necessity, as the hack with " " as entity name obviously does not work for these. |
Vote up |
vote up +1 |
Vote up +1 |
Describe the problem you have/What new integration you would like
The prefixing of "friendly_name" to entities should be optional, or have a way to disable it.
Please describe your use case for this integration and alternatives you've tried:
When the "friendly_name" gets prefixed to the name of an entity, especially when a ESP node handles multiple different type of entities, it can sometimes make the name incoherent. This can sometimes be acceptable to look at, but when the name is used by voice assistant, it can make the sentence completely awkward or too wordy.
I know that the name can be changed in the UI, or an alias can be created, but it should be possible to do this from the beginning.
Additional context
Here is an example of the problem:
I have a ESP node with a friendly name of "Pool chemical controller", then in that node I have entities "Chlorine pump", "Acid pump", plus a few others and a variety of sensors.
If I want to turn on the chlorine pump, right now I have to say "Turn on the pool chemical controller chlorine pump", I should be able to just say "Turn on the chlorine pump".
The text was updated successfully, but these errors were encountered: