mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-13 12:26:50 +00:00
Modify intent docs
This commit is contained in:
parent
abee4205d3
commit
9766ffdfef
@ -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:
|
||||
@ -23,6 +23,7 @@ conversation:
|
||||
```
|
||||
|
||||
To add custom phrases to be recognized:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry with custom phrasesconversation
|
||||
conversation:
|
||||
@ -32,11 +33,17 @@ conversation:
|
||||
service: input_boolean.toggle
|
||||
```
|
||||
|
||||
The action keyword uses [script
|
||||
syntax](https://home-assistant.io/docs/scripts/).
|
||||
|
||||
The action keyword uses [script 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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
```yaml
|
||||
{% raw %}# Example configuration.yaml entry
|
||||
# Example configuration.yaml entry
|
||||
intent_script:
|
||||
GetTemperature: # Intent type
|
||||
speech:
|
||||
text: We have {{ states.sensor.temperature }} degrees
|
||||
text: We have {% raw %}{{ states.sensor.temperature }}{% endraw %} degrees
|
||||
action:
|
||||
service: notify.notify
|
||||
data_template:
|
||||
message: Hello from an intent!
|
||||
{% endraw %}
|
||||
```
|
||||
Configuration variables:
|
||||
|
||||
Inside an intent we can define these variables:
|
||||
- **speech** (*Optional*): Text or template to return
|
||||
- **action** (*Optional*): [Script syntax]
|
||||
|
||||
- **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.
|
||||
|
||||
[Script syntax]: /docs/scripts/
|
||||
|
23
source/_components/shopping_list.markdown
Normal file
23
source/_components/shopping_list.markdown
Normal 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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user