#Create random and custom responses to default intents

1 messages · Page 1 of 1 (latest)

bronze obsidian
#

Hi, I was wondering if anyone could help me with two things. The first is to create random responses to intents. I have created one for errors (copied from another helpful soul on the HA forum), and would now like to add some randomness, however it's not giving me the response I expected. Here's my code:

#

language: "en"
responses:
errors:
no_intent:
speech:
text: >-
{{ ["Sorry, I don't speak Pleb",
"Sorry, I didn't understand that",
"I'm sorry, Dave. I'm afraid I can't do that",
] | random }}

#

So far, is just giving me the default 'Sorry, I didn't understand that' response. I also tried removing the speech: and text: lines, then I receive a strange response.