Skip to content

Commit 9766ffd

Browse files
committed
Modify intent docs
1 parent abee420 commit 9766ffd

File tree

3 files changed

+42
-11
lines changed

3 files changed

+42
-11
lines changed

source/_components/conversation.markdown

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ha_category: "Voice"
1212
---
1313

1414

15-
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.
15+
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.
1616

1717

1818
To enable the conversation option in your installation, add the following to your `configuration.yaml` file:
@@ -23,6 +23,7 @@ conversation:
2323
```
2424
2525
To add custom phrases to be recognized:
26+
2627
```yaml
2728
# Example configuration.yaml entry with custom phrasesconversation
2829
conversation:
@@ -32,11 +33,17 @@ conversation:
3233
service: input_boolean.toggle
3334
```
3435
35-
The action keyword uses [script
36-
syntax](https://home-assistant.io/docs/scripts/).
37-
36+
The action keyword uses [script syntax](https://home-assistant.io/docs/scripts/).
3837
38+
To use the `conversation` component with the [`shopping list` component](/components/shopping_list/) add an intent.
3939

40+
```yaml
41+
# Example configuration.yaml entry
42+
conversation:
43+
intents:
44+
ShoppingListAddItem:
45+
- Add {item} to my shopping list
46+
```
4047

4148
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.
4249

source/_components/intent_script.markdown

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,22 @@ ha_release: "0.50"
1515
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.
1616

1717
```yaml
18-
{% raw %}# Example configuration.yaml entry
18+
# Example configuration.yaml entry
1919
intent_script:
2020
GetTemperature: # Intent type
2121
speech:
22-
text: We have {{ states.sensor.temperature }} degrees
22+
text: We have {% raw %}{{ states.sensor.temperature }}{% endraw %} degrees
2323
action:
2424
service: notify.notify
2525
data_template:
2626
message: Hello from an intent!
27-
{% endraw %}
2827
```
28+
Configuration variables:
2929
3030
Inside an intent we can define these variables:
31-
- **speech** (*Optional*): Text or template to return
32-
- **action** (*Optional*): [Script syntax]
33-
- **async_action** (*Optional*): Set to True to have Home Assistant not wait for the script to finish before returning the intent response.
3431
35-
[Script syntax]: /docs/scripts/
32+
- **intent** (*Required*): Name of the intent. Multiple entries are possible.
33+
- **speech** (*Optional*): Text or template to return.
34+
- **action** (*Optional*): [Script syntax](/docs/scripts/).
35+
- **async_action** (*Optional*): Set to True to have Home Assistant not wait for the script to finish before returning the intent response.
36+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
layout: page
3+
title: "Shopping List"
4+
description: "Instructions on how to integrate a Shopping list into Home Assistant using Intent."
5+
date: 2017-07-29 13:00
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: home-assistant.png
11+
ha_category: Intent
12+
ha_release: "0.50"
13+
---
14+
15+
The `shopping_list` component is a feature for the [`intent_script` component](/components/intent_script/).
16+
17+
```yaml
18+
# Example configuration.yaml entry
19+
shopping_list:
20+
```
21+
22+
Eg. check the [`conversion`](/components/conversation/) about how to add and delete items from the list.
23+

0 commit comments

Comments
 (0)