Intent Script


The intent_script integration allows users to configure actions and responses to intents. Intents can be fired by any integration that supports it. Examples are Alexa (Amazon Echo), Dialogflow (Google Assistant) and Snips.

# Example configuration.yaml entry
intent_script:
  GetTemperature:  # Intent type
    speech:
      text: We have {{ states('sensor.temperature') }} degrees
    action:
      service: notify.notify
      data:
        message: Hello from an intent!

Inside an intent we can define these variables:

Configuration Variables

intent map Required

Name of the intent. Multiple entries are possible.

action action (Optional)

Defines an action to run to intents.

async_action boolean (Optional, default: false)

Set to True to have Home Assistant not wait for the script to finish before returning the intent response.

card map (Optional)

Card to display.

type string (Optional, default: simple)

Type of card to display.

title template Required

Title of the card to display.

content template Required

Contents of the card to display.

speech map (Optional)

Text or template to return.

type string (Optional, default: plain)

Type of speech.

text template Required

Text to speech.