diff --git a/source/_components/conversation.markdown b/source/_components/conversation.markdown index 5397a3297ee..55b9fbb19a7 100644 --- a/source/_components/conversation.markdown +++ b/source/_components/conversation.markdown @@ -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 `, 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 `, 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. diff --git a/source/_components/intent_script.markdown b/source/_components/intent_script.markdown index 633b400dd61..68336fd79d5 100644 --- a/source/_components/intent_script.markdown +++ b/source/_components/intent_script.markdown @@ -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] -- **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. + diff --git a/source/_components/shopping_list.markdown b/source/_components/shopping_list.markdown new file mode 100644 index 00000000000..a054454e910 --- /dev/null +++ b/source/_components/shopping_list.markdown @@ -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. +