intents icon indicating copy to clipboard operation
intents copied to clipboard

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

Open rccoleman opened this issue 11 months ago • 1 comments

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.

rccoleman avatar Feb 29 '24 17:02 rccoleman

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('_', ' ') }}

v1k70rk4 avatar Mar 04 '24 23:03 v1k70rk4