Set conversation response

Use this action to set what Assist says, or shows, when a voice command or sentence starts the automation. Together with a sentence trigger, it answers a custom command.

Using this action from the user interface

If you prefer building automations and scripts visually, Home Assistant walks you through this action step by step. You fill in a few options and save. No YAML knowledge required.

To set the response from an automation:

  1. Go to Settings > Automations & scenes and open the automation that has the sentence trigger.
  2. In the Then do section, select Add action.
  3. Search for and select Set conversation response.
  4. In Set conversation response, enter the response. You can use a template, for example, to include the state of an entity.
  5. Select Save.

Options in the UI

Set conversation response (Required)

What Assist says or shows. Can be a template.

Using this action in YAML

If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.

In YAML, use set_conversation_response with the response. The response can be a template:

ActionAn action makes Home Assistant do something, for example, turn on a light, send a notification, or activate a scene. Automations and scripts run a list of actions. [Learn more]
- variables:
    my_var: "123"
- set_conversation_response: "{{ 'Testing ' ~ my_var }}"

This example responds with “Testing 123”.

To clear a response that an earlier step set, set it to empty:

ActionAn action makes Home Assistant do something, for example, turn on a light, send a notification, or activate a scene. Automations and scripts run a list of actions. [Learn more]
set_conversation_response:

Options in YAML

set_conversation_response template Required

What Assist says or shows. Can be a template. To clear a response that an earlier step set, leave it empty.

Good to know

  • Assist uses the response when the automation finishes. If the automation sets the response more than once, the last one is used.
  • If the automation didn’t start from a conversation, for example, from a time trigger, the response isn’t used.
  • Set the response in the automation itself. If the automation runs a script, a response that the script sets doesn’t reach Assist. To use data from a script, let the script return a response with Stop, and use that data in the automation’s Set conversation response.

More examples

Real scenarios where this action shows up in automations and scripts. Copy any example and adapt it to your setup. In the visual editor, select the UI options listed in the example or paste the YAML code.

Tip

You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the visual automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.

Automation: Answer whether the garage door is open

When you ask Assist “Is the garage door open?”, this automation answers with the current state of the garage door, for example, “The garage door is closed.”

  • Trigger: Sentence
    • Sentence: Is the garage door open
  • Action: Set conversation response
    • Set conversation response: The garage door is {{ states('cover.garage_door') }}.
YAML example
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Answer whether the garage door is open"
triggers:
  - trigger: conversation
    command: "Is the garage door open"
actions:
  - set_conversation_response: >
      The garage door is {{ states('cover.garage_door') }}.

Still stuck?

The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the action you’re calling and what you expected to happen, or share on our subreddit /r/homeassistant.

Tip

AI assistants like ChatGPT or Claude can also explain actions or suggest the right one when you describe what you want in plain language.