Conversations, intents, and automations

Hey all!

I’m relatively new to HA, and starting to try to build more interesting / useful automations with the goal of using them through Voice Assist. I’m having a little trouble understanding the proper way to set up the following automation, and wondering if anyone might be able to help clear things up for me / point me in the right direction…

My goal is be able to say, “Let me know when {guest} arrives”, and have that kick off an automation that detects when someone arrives at our house, and then broadcast a message saying, “It looks like {guest} has arrived”. I’ve created a conversation-based trigger and I’m able to and kick off the automation that I need… the only problem is that I can’t figure out how to capture the {guest} portion of the conversation request and save it for later.

My thought was to just save the value of {guest} in an input helper or something, and then just use that when the automation runs… I just can’t figure out how to get access to whatever the parser heard in the {guest} section. I’m assuming it’s similar to the “slots” or “lists” concept that intents have, but should allow any value instead of a set of predefined ones.

Is this the right approach, and there’s just something I’m missing in terms of how I can access the {guest} value? Or am I totally going about this the wrong way?

Any thoughts or advise would be appreciated!
Thanks in advance!

You need to do a wildcard

This thread is probably similar enough to what you’re trying to do to be helpful.

Also look up how to do a wildcard list entry in Intent_script (it becomes incredibly useful in custom intents if you go that way.)

1 Like

Sweet, thanks! I’ll check it out. Much appreciated.

1 Like

Just following up in case anyone else is trying to do something similar. The key was that I needed to refer to the {guest} portion of my request as {trigger.slots.guest} later in my automation. For example:

triggers:
  - trigger: conversation
    command:
      - Let (me | us | everyone) know when {guest} (gets here | arrives)
    id: notify-me

   ...

  - action: input_text.set_value
    metadata: {}
    data:
      value: "{{ trigger.slots.guest }}"
    target:
      entity_id: input_text.guest_name

Big ups to NathanCu for pointing me in the right direction!

1 Like