Skip to content
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

Response to voice commands targeting an entity respond based on the domain and not with the terminology that the user used #2019

Open
rccoleman opened this issue Feb 29, 2024 · 1 comment

Comments

@rccoleman
Copy link

rccoleman commented Feb 29, 2024

I have a number of entities that are exposed to Assist that I use voice commands to control and I find that the response uses HA-specific terminology, specifically the domain of the entity, rather than the term that the user used. For example, I have an input_boolean helper with an alias of "pump", and when I say "turn on the pump", the voice response is "turned on input_boolean" (as "input underscore boolean", which is especially weird and robotic). Same thing when I say "Turn on the family room lights", which is an alias for a light entity, and the response is "turned on the light", because it's a light group. I guess my "complaint" is that it responds based on domain of the entity, rather than just parroting what the user asked for, which can be confusing. It seems like Assist knows what the user asked for, and could respond in kind.

I've noticed this behavior for "a while", but I'm not sure when it started, or if it ever responded based on the initial request. I do see this behavior in 2023.3.0b1. @tetele asked that I open an issue here based on a discussion on Discord.

@v1k70rk4
Copy link
Member

v1k70rk4 commented Mar 4, 2024

Hi, I also struggled with avoiding the underline in Hungarian :)

I solved it in the following way:

     {% set translations_domains_with_article = {
        "button": "gombot",
        "camera": "kamerát",
        "input_button": "gombot",
        "alarm_control_panel": "riasztót",
        "automation": "automatizálást",
        "fan": "ventilátort",
        "climate": "hőmérsékletszabályozót",
        "humidifier": "párásítót",
        "input_boolean": "kapcsolót",
        "siren": "szirénát",
        "water_heater": "melegvíz tartályt",
        "light": "lámpát",
        "switch": "kapcsolót",
        "script": "szkriptet",
        "remote": "távirányítót",
        "lock": "zárat",
        "vacuum": "porszívót",
        "scene": "jelenetet",
        "media_player": "médialejátszót",
        "lawn_mower": "fűnyírót",
        "valve": "szelepet"
        } %}

I'm just looking at it, and indeed in the English assistant, it displays the domain in the response and not the name. From what I read, this is due to the simplification of responses to minimize the variety of responses.

I don't even remember from which language I translated, but the Hungarian assistant uses the device name for confirmation.

That is, the system is capable of displaying the name, so it's a matter of decision. The translation code snippet can be used in English too to eliminate underscores.
Although in English, it might be sufficient to replace the "_" character with a space and it will still make sense.

Turned on the {{ state.domain | replace('_', ' ') }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants