You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_components/conversation.markdown
+11-4Lines changed: 11 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ha_category: "Voice"
12
12
---
13
13
14
14
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.
16
16
17
17
18
18
To enable the conversation option in your installation, add the following to your `configuration.yaml` file:
@@ -23,6 +23,7 @@ conversation:
23
23
```
24
24
25
25
To add custom phrases to be recognized:
26
+
26
27
```yaml
27
28
# Example configuration.yaml entry with custom phrasesconversation
28
29
conversation:
@@ -32,11 +33,17 @@ conversation:
32
33
service: input_boolean.toggle
33
34
```
34
35
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/).
38
37
38
+
To use the `conversation` component with the [`shopping list` component](/components/shopping_list/) add an intent.
39
39
40
+
```yaml
41
+
# Example configuration.yaml entry
42
+
conversation:
43
+
intents:
44
+
ShoppingListAddItem:
45
+
- Add {item} to my shopping list
46
+
```
40
47
41
48
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.
Copy file name to clipboardExpand all lines: source/_components/intent_script.markdown
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -15,21 +15,22 @@ ha_release: "0.50"
15
15
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.
16
16
17
17
```yaml
18
-
{% raw %}# Example configuration.yaml entry
18
+
# Example configuration.yaml entry
19
19
intent_script:
20
20
GetTemperature: # Intent type
21
21
speech:
22
-
text: We have {{ states.sensor.temperature }} degrees
22
+
text: We have {% raw %}{{ states.sensor.temperature }}{% endraw %} degrees
23
23
action:
24
24
service: notify.notify
25
25
data_template:
26
26
message: Hello from an intent!
27
-
{% endraw %}
28
27
```
28
+
Configuration variables:
29
29
30
30
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.
34
31
35
-
[Script syntax]: /docs/scripts/
32
+
- **intent** (*Required*): Name of the intent. Multiple entries are possible.
33
+
- **speech** (*Optional*): Text or template to return.
0 commit comments