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_template:
        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)

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

Default value:

false

card

(map)(Optional)

Card to display.

type

(string)(Optional)

Type of card to display.

Default value:

simple

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)

Type of speech.

Default value:

plain

text

(template)(Required)

Text to speech.