HA Voice cannot parse a sentence for a specific light

I’m struggling to resolve an issue with Home Assistant voice:

  • Home Assistant Voice PE responds “An unexpected error occurred”
  • Sentence Parser cannot parse “office light on” or “office light off”. It doesn’t respond at all. In debug mode, the browser reports unidentified errors
  • The entity is named “office Light” and it’s in an area called “office”.
  • all other similar commands work “kitchen light off”, “bedroom light on” even areas with no area like “ground light on” gets parsed.
  • Office light is a valid entity (light.office_light) that has been type changed from a matter switch (switch.office_light)
  • Alexa works (through HA Cloud) using the same sentence.
  • I’ve completely removed all my custom intents and scripts…

No idea where to look for solutions next…

Also, if I use “set the office light to 20 percent” (it’s not a dimmable light) it parses as follows:

intent:
  name: HassLightSet
slots:
  name: office light
  brightness: '20'
details:
  name:
    name: name
    value: Office Light
    text: office light
  brightness:
    name: brightness
    value: 20
    text: '20'
targets:
  light.office_light:
    matched: true
match: true
sentence_template: '[<numeric_value_set>] <name> [to] <brightness> [brightness]'
unmatched_slots: {}
source: builtin

if I use “office light on for now” it parses as follows (I have no scene for that):

intent:
  name: HassTurnOn
slots:
  domain: scene
details:
  domain:
    name: domain
    value: scene
    text: ''
targets: {}
match: false
sentence_template: '[activate] <name> [scene] <in> <area>'
unmatched_slots:
  name: 'office light '
  area: for now
source: builtin

Bad naming. The area name and the common word “light” is a very problematic combination.
Use unique names, or just “light”.
Then the main templates

<turn> on <area> <name>
<area> <name> on

will work.

Changed entity name to “Light”. Same error.



The your problem in something else. Try doing a trace in the dev tools again.

Still, I’d avoid such a generic name for a light fixture, though it works. These sentences are matched by another group of templates for all the light in the Area. But the command for name has a higher priority, and you can’t use this simple form of sentences to turn on all the lights in a room.
But it’s up to you to decide how to use it

Also, there is always the option to hard-code a command with any name value in automation, it will always be executed with the highest priority.

I’m not sure why but the actions below resolved this issue for me.

  1. I toggled off the exposure of this entity to all voice assistance.

  2. I renamed the light “ceiling light”

  3. I toggled the exposure of the entity back on. And confirm that it worked in the
    assistant.

  4. I renamed the light “office light”

Works like a charm. No idea why.