Custom Sentences not found

I tried to create custom sentences as explained here: https://www.home-assistant.io/voice_control/custom_sentences/

When I put custom intents in my configuration.yaml it is working, but when I put them in a .yaml file in configuration/custom_sentences/[language] the custom intents are not found. When I try to execute them I get “Sorry, I couldn’t understand that” from the voice assistant and the Assist Sentences parser returns “No intent matched”. I tried restarting HomeAssistant to make sure the files are found. I tried German and English as languages and I checked for typos.
Do I need to include the files somehow with an !include? Or are they supposed to be found automatically?

I’m also experiencing this same issue. Any luck in getting this working?

Yes, after a lot of try and error, I got it working like this:

Put the sentences you want Assist to respond to in in custom_sentences/de/test.yaml
(replace [de] with the language you set you Assistant to). If everything is set up correctly files in this folder are found automatically.

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

Incude your intents file in configuration.yaml

intent:
intent_script: !include intents.yaml

The responses go into intents.yaml

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

The advanatge of putting the intents and custom sentences in seperate files is that you can reload them separately and don’t need to restart the Home Assistant every time. Also it is a bit more tidied up.

1 Like

That’s great thank you… have managed to get mine up and running. Onto the next challenge!

1 Like

Having the same problem. Except this example doesn’t work for me.

If I add custom sentences through an automation, it works… but not through yaml.

The Ping and Pong example still gives me

Unexpected error during intent recognition (intent-failed)