#custom sentences not loading

1 messages · Page 1 of 1 (latest)

worthy rivet
#

Hi,

I created a test-file here home-assistant/config/custom_sentences/de/test.yaml
containing this:

language: "de"
intents:
  TestIntent:
    data:
      - sentences:
          - "Fahr los"
intent_script:
  TestIntent:
    action:
      event: "intent_event"
      event_data:
        entity_id: 1
        volume_level: 2

I then reloaded all yaml configs in HA, but the intent doesn't work. I can't see it anywhere and Assist doesn't seem to know about it.

I am not sure how to troubleshoot this and I'd be happy about any and all help! Thanks!

lone dune
#

the intent_script should not be there, but elsewhere. I'm not even sure that config passes validation. didn't it say so when you reloaded the conversation config?

worthy rivet
#

It didn't complain when I tested the config. I also thought that it was opk to have intents and intent_script in the same yaml.
As a test I deleted the intent_script part and reloaded, but still nothing.
Should I be able to see the intent under automations?

lone dune
#

uhm... no, but you need to put the intent_script part in configuration.yaml and, as it looks so far, it's invalid

#

also, it would be nice to add a bit of response to it. here's what i'm proposing

# configuration.yaml
intent_script:
  TestIntent:
    speech:
      text: "hey there!"
    action:
      - event: "intent_event"
        event_data:
          entity_id: 1
          volume_level: 2
worthy rivet
#

Thanks, I tried putting your code into my configuration.yaml and it didn't change anything. Still no response.

#

Do I need to put anything into the configuration.yaml for the intents?

#

From the docs it appears I don't, but since it doesn't work I am not sure.

lone dune
#

you need to have at least conversation: there, iirc

worthy rivet
#

Thanks, I missed that. I added it, checked the config and restarted HA, but still... I am not seeing the "hey there!"

lone dune
#

Seeing where? How are you testing?

worthy rivet
#

In Assist: I am opening the App, opening assist, then I write "Fahr los". It then tells me (in german) that it didn't understand me.

lone dune
#

So it's not loading the custom sentences. You have restarted HA, haven't you?

#

Also, use Assist debugger in the dev tools

worthy rivet
#

"No intent matched"

#

That's what I see in the debugger.

#

I find it weird that nothing else has to be added to the configuration.yaml regarding intents

lone dune
#

What else would you expect?

worthy rivet
#

That I need to add a intents: -key somewhere for example. But I assume that might be taken care of by the conversations: key

lone dune
#

try adding this to configuration.yaml

intent:
conversation:
intent_script:
  TestIntent:
    speech:
      text: "hey there!"
    action:
      - event: "intent_event"
        event_data:
          entity_id: 1
          volume_level: 2

then under config/custom_sentences/de/test.yaml

language: "de"
intents:
  TestIntent:
    data:
      - sentences:
          - "Fahr los"
#

restart HA and check for any error logs

worthy rivet
#

well.... this is all sorts of embarassing. I decided to double check the paths and noticed that I mounted my config folder into a subfolder of the configfolder in the HA container.
I guess that hasn't been a problem so far because for every other integration I need to point the configuration to the right folder manually.
Thank you VERY much for your help!

lone dune
#

for optimized file structure when you have many custom sentences, feel free to take a look over this repo https://github.com/tetele/custom_sentences
the actual sentences in that repo are crap, but the structure is pretty good, imho