Custom intent - Unexpected error during intent recognition

image

I can’t add a custom intent to my home assistant, the built in works.
It fails with Unexpected error during intent recognition.

What i did is create under the path custom_sentences/en/test.yaml that looks like this

language: "en"
intents:
  Test:
    data:
      - sentences:
          - "Hello"
          - "Hi"
  Ping:
    data:
      - sentences:
          - "Ping"

And my configuration file looks like this

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

intent_script:
  Test:
    speech:
      text: "Hello!"
  Ping:
    speech:
      text: "Pong"

The error in the voice assistant manager looks like this

stage: done
run:
  pipeline: 01hgfkazfk5y3fb9130mxak04w
  language: en
  runner_data:
    stt_binary_handler_id: null
    timeout: 300
events:
  - type: run-start
    data:
      pipeline: 01hgfkazfk5y3fb9130mxak04w
      language: en
      runner_data:
        stt_binary_handler_id: null
        timeout: 300
    timestamp: "2023-11-30T14:48:12.763090+00:00"
  - type: intent-start
    data:
      engine: homeassistant
      language: en
      intent_input: Ping
      conversation_id: null
      device_id: null
    timestamp: "2023-11-30T14:48:12.763157+00:00"
  - type: error
    data:
      code: intent-failed
      message: Unexpected error during intent recognition
    timestamp: "2023-11-30T14:48:12.779296+00:00"
  - type: run-end
    data: null
    timestamp: "2023-11-30T14:48:12.779379+00:00"
intent:
  engine: homeassistant
  language: en
  intent_input: Ping
  conversation_id: null
  device_id: null
  done: false
error:
  code: intent-failed
  message: Unexpected error during intent recognition

What can i do to fix this issue?

1 Like

I was having the same issue. And a restart of home assistant got my custom sentences working.

Same here with HA 2024.1.6. Unfortunately a restart didn’t fix it.