Need to change plaintext to plain in Intent_scripts for Alexa in HA 50.1

Took me a bit to figure out when moving Alexa intents to intent_scripts you need to change the type to plain from plaintext

speech:
  type: plain
3 Likes

Thanks! I’m struggling to understand the difference between the old alexa intents vs intent scripts?

1 Like

Thanks. Still gathering intelligence to see what I will need to change before upgrading. This helps.

If I understood it correctly, this unifies all the AI platforms - Alexa, API.AI (Google Assistant) and SNIPS - so that you write the intent the same way and then any one of the platforms can use it.

1 Like

The only thing I had to do to make Alexa work for 50.1 was move the Alexa intents to intent_scripts: and replace plaintext with plain

To do this, I only had to replace intent with the intent_script: and remove two spaces on that and every line after. My alexa component has nothing except

Alexa:

3 Likes

Thanks for the post. I had to do some additional steps. In my case, I used to enable alexa with this in my configuration.yaml.

Alexa: !include alexa.yaml

  1. Copy text of alexa.yaml to intent_script.yaml
  2. Add intent_script component to configuration.yaml. Do not rename the Alexa component because you need to keep it for the endpoint. If you remove it, /api/alexa will return a 404 error (this threw me off for a while).

Alexa: !include alexa.yaml
intent_script: !include intent_script.yaml

Next steps are all in intent_script.yaml
3. Delete “intents:” at the start of the intents. My first one is WhereAreWeIntent.

 intents:
   WhereAreWeIntent:        
  1. Delete the first two spaces from all lines.

  2. Replace all “plaintext” with “plain”.

 speech:
   type: plain        
  1. Remove any card statements. This was from the prior tutorial and doesn’t work with intent_script.
 card:
   type: simple        
   title: Where are We?
   content: Ask Home Assistant about where everyone is
11 Likes

Thanks a lot!

Thank you, it really helped me out!

Thank you, this also really helped me! It would have taking me a ton more time to figure this out on my own, I appreciate it.

Thanks alot alandtse! Much appreciated!