Modify intent docs

This commit is contained in:
Fabian Affolter 2017-07-29 22:11:20 +02:00
parent abee4205d3
commit 9766ffdfef
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336
3 changed files with 42 additions and 11 deletions

View File

@ -12,7 +12,7 @@ ha_category: "Voice"
--- ---
The conversation component can process sentences into commands for Home Assistant. It currently has built in functionality to recognize `turn <Friendly Name> <on/off>`, but custom phrases can be added through configuration. The `conversation` component can process sentences into commands for Home Assistant. It currently has built in functionality to recognize `turn <Friendly Name> <on/off>`, but custom phrases can be added through configuration.
To enable the conversation option in your installation, add the following to your `configuration.yaml` file: To enable the conversation option in your installation, add the following to your `configuration.yaml` file:
@ -23,6 +23,7 @@ conversation:
``` ```
To add custom phrases to be recognized: To add custom phrases to be recognized:
```yaml ```yaml
# Example configuration.yaml entry with custom phrasesconversation # Example configuration.yaml entry with custom phrasesconversation
conversation: conversation:
@ -32,11 +33,17 @@ conversation:
service: input_boolean.toggle service: input_boolean.toggle
``` ```
The action keyword uses [script The action keyword uses [script syntax](https://home-assistant.io/docs/scripts/).
syntax](https://home-assistant.io/docs/scripts/).
To use the `conversation` component with the [`shopping list` component](/components/shopping_list/) add an intent.
```yaml
# Example configuration.yaml entry
conversation:
intents:
ShoppingListAddItem:
- Add {item} to my shopping list
```
When this component is active and you are using a supported browser voice commands will be activated in the frontend. Browse to [the demo](/demo/) using Chrome or Chromium to see it in action. When this component is active and you are using a supported browser voice commands will be activated in the frontend. Browse to [the demo](/demo/) using Chrome or Chromium to see it in action.

View File

@ -15,21 +15,22 @@ ha_release: "0.50"
The intent_script component allows users to configure actions and responses to intents. Intents can be fired by any component that supports it. Examples are Alexa (Amazon Echo), API.ai (Google Assistant) and Snips. The intent_script component allows users to configure actions and responses to intents. Intents can be fired by any component that supports it. Examples are Alexa (Amazon Echo), API.ai (Google Assistant) and Snips.
```yaml ```yaml
{% raw %}# Example configuration.yaml entry # Example configuration.yaml entry
intent_script: intent_script:
GetTemperature: # Intent type GetTemperature: # Intent type
speech: speech:
text: We have {{ states.sensor.temperature }} degrees text: We have {% raw %}{{ states.sensor.temperature }}{% endraw %} degrees
action: action:
service: notify.notify service: notify.notify
data_template: data_template:
message: Hello from an intent! message: Hello from an intent!
{% endraw %}
``` ```
Configuration variables:
Inside an intent we can define these variables: Inside an intent we can define these variables:
- **speech** (*Optional*): Text or template to return
- **action** (*Optional*): [Script syntax]
- **async_action** (*Optional*): Set to True to have Home Assistant not wait for the script to finish before returning the intent response.
[Script syntax]: /docs/scripts/ - **intent** (*Required*): Name of the intent. Multiple entries are possible.
- **speech** (*Optional*): Text or template to return.
- **action** (*Optional*): [Script syntax](/docs/scripts/).
- **async_action** (*Optional*): Set to True to have Home Assistant not wait for the script to finish before returning the intent response.

View File

@ -0,0 +1,23 @@
---
layout: page
title: "Shopping List"
description: "Instructions on how to integrate a Shopping list into Home Assistant using Intent."
date: 2017-07-29 13:00
sidebar: true
comments: false
sharing: true
footer: true
logo: home-assistant.png
ha_category: Intent
ha_release: "0.50"
---
The `shopping_list` component is a feature for the [`intent_script` component](/components/intent_script/).
```yaml
# Example configuration.yaml entry
shopping_list:
```
Eg. check the [`conversion`](/components/conversation/) about how to add and delete items from the list.