diff --git a/source/_includes/asides/docs_navigation.html b/source/_includes/asides/docs_navigation.html index c70bc53be07..dbf972094bf 100644 --- a/source/_includes/asides/docs_navigation.html +++ b/source/_includes/asides/docs_navigation.html @@ -40,9 +40,17 @@
+You can import the button shortcut multiple times to create versions for different languages, when asked if you would like to replace your Shortcut, choose "Keep Both". +
+ +## Multiple servers + +The Assist shortcut works also if you have configured multiple Home Assistant servers. By default it will prompt you to pick the server to sent the command too. This is not very hands-off, and so you can update the shortcut to point at a specific server. You will need to import the shortcuts multiple times, once for each server. + +Open the shortcuts app and edit each Assist shortcut. The text in quotes will be shown in the language of your device. + +- Use the arrow to expand the _"Assist with `Provided Input`"_ action, and select your Home Assistant server. + +## Customizing the Siri experience + +Siri allows activating shortcuts by their name. If you change the name of the "Assist" shortcut, you will also have to refer to it by its new name: "Hey Siri, my new name". Be aware that Siri can get confused and might not work if your shortcut name overlaps with actual Siri commands. + +It is possible to change the text that Siri says when activating the Assist shortcut. Open the shortcuts app and edit each your Assist shortcut. The text in quotes will be shown in the language of your device. + +- Find _"Ask for `Text`"_ and tap on _`How can I assist?`_ and change it to your desired prompt. + +You can also use the share action to [add a Shortcut to your Home Screen](https://support.apple.com/guide/shortcuts/apd735880972/ios) or set an [Accessibility Shortcut](https://support.apple.com/en-gb/HT204390) to run this Shortcut when you triple-click the Side button. + +## Changelog + +### Version 1 - Jan 26, 2022 + +Initial release diff --git a/source/docs/assist/builtin_sentences.markdown b/source/docs/assist/builtin_sentences.markdown new file mode 100644 index 00000000000..41abf4245e7 --- /dev/null +++ b/source/docs/assist/builtin_sentences.markdown @@ -0,0 +1,27 @@ +--- +title: "Assist - Default Sentences" +--- + +Home Assistant comes with built-in sentences [contributed by the community](https://github.com/home-assistant/intents/) for [dozens of languages](https://developers.home-assistant.io/docs/voice/intent-recognition/supported-languages). +These sentences allow you to: + +* **Turn entities on and off** + * *"turn on the living room light"* + * *"turn off ceiling fan"* +* **Open and close covers** + * *"Close the garage door"* + * *"Open kitchen window"* +* **Set the brightness and color of lights** + * *"Change kitchen lights brightness to 50%"* + * *"Set bed light to green"* + +In addition to individual entities, commands can target **areas**: + +* *"turn on all lights in the living room"* +* *"open windows in the kitchen"* +* *"change kitchen brightness to 50%"* +* *"set bedroom lights to green"* + +Entity [aliases](/docs/assist/aliases) are also matched so multiple names can be used, even in different languages. + +You can extend the built-in sentences or [add your own](/docs/assist/custom_sentences) to trigger any action in Home Assistant. diff --git a/source/docs/assist/custom_sentences.markdown b/source/docs/assist/custom_sentences.markdown new file mode 100644 index 00000000000..5c2e5112a92 --- /dev/null +++ b/source/docs/assist/custom_sentences.markdown @@ -0,0 +1,120 @@ +--- +title: "Assist - Custom Sentences" +--- + +You may add your own sentences to the intent recognizer by either extending an [existing intent](https://developers.home-assistant.io/docs/intent_builtin/) or creating a new one. You may also [customize responses](#customizing-responses) for existing intents. + +## In configuration.yaml + +Intents and sentences may be added in the [`conversation`](/integrations/conversation/) config in your `configuration.yaml` file: + +{% raw %} + +```yaml +# Example configuration.yaml +conversation: + intents: + HassTurnOn: + - "activate [the] {name}" +``` + +```yaml +# Example configuration.yaml +conversation: + intents: + HassTurnOn: + - "activate [the] {name}" +``` + +{% endraw %} + +This extends the default English sentences for the `HassTurnOn` intent, allowing you to say "activate the kitchen lights" as well as "turn on the kitchen lights". + +New intents can also be added, with their responses and actions defined using the [`intent_script`](/integrations/intent_script/) integration: + +{% raw %} + +```yaml +# Example configuration.yaml +conversation: + intents: + YearOfVoice: + - "how is the year of voice going" + +intent_script: + YearOfVoice: + speech: + text: "Great! We're at over 40 languages and counting." +``` + +{% endraw %} + +Besides a text response, `intent_script` can trigger any `action` available in Home Assistant, such as calling a service or firing an event. + +## In config directory + +More advanced customization can be done in Home Assistant's `config` directory. YAML files in `config/custom_sentences/en`, for example, will be loaded when English sentences (language code `en`) are requested. + +The following example creates a new `SetVolume` intent that changes the volume on one of two media players: + +{% raw %} + +```yaml +# Example config/custom_sentences/en/media.yaml +language: "en" +intents: + SetVolume: + data: + - sentences: + - "(set|change) {media_player} volume to {volume} [percent]" + - "(set|change) [the] volume for {media_player} to {volume} [percent]" +lists: + media_player: + values: + - in: "living room" + out: "media_player.living_room" + - in: "bedroom" + out: "media_player.bedroom" + volume: + range: + from: 0 + to: 100 +``` + +{% endraw %} + +As mentioned above, you can then use the `intent_script` integration to implement an action and provide a response for `SetVolume`: + +{% raw %} + +```yaml +# Example configuration.yaml +intent_script: + SetVolume: + action: + service: "media_player.volume_set" + data: + entity_id: "{{ media_player }}" + volume_level: "{{ volume / 100.0 }}" + speech: + text: "Volume changed to {{ volume }}" +``` + +{% endraw %} + +## Customizing Responses + +Responses for existing intents can be customized as well in `config/custom_sentences/