Assist default sentences: add section explaining how ... (#27242)

* Assist default sentences: add section explaining how to view supported sentences

* fix typo
This commit is contained in:
c0ffeeca7 2023-05-03 18:11:55 +02:00 committed by Franck Nijhof
parent 482b2ed58a
commit 77d3a9fd79
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
4 changed files with 33 additions and 0 deletions

View File

@ -25,3 +25,36 @@ In addition to individual entities, commands can target **areas**:
Entity [aliases](/docs/assist/aliases) are also matched so multiple names can be used, even in different languages. 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. You can extend the built-in sentences or [add your own](/docs/assist/custom_sentences) to trigger any action in Home Assistant.
## View existing sentences
Broadly speaking, you can use your voice to turn things on or off, inquire about a state, or change the brightness or color of a light.
If the voice assistant doesn't understand you, you may need to rephrase your sentence a bit.
To get an idea of the specific sentences that are supported for your language, you can do the following:
1. Take a look at the test sentences:
* On github, in the [tests](https://github.com/home-assistant/intents/tree/main/sentences) folder, open the subfolder for your language.
* Look through the test files to see the example sentences that have been tested.
* The second part of the file name shows the intent, the first part shows the domain. For some domains, such as covers, fans, and light, there are specific sentences.
The other domains are covered by the generic *homeassistant_*.
![Example of a folder of assistant sentence test files](/images/assist/intents-test-files.png)
* The screenshot below shows sentences used to test the command to turn on the lights. Note that *Living room* here is just a place holder.
It could be any area that you have in your home.
![Example of a set of test sentences](/images/assist/assist-test-file-light-turn-on.png)
2. View the sentence definition:
* On github, in the [tests](https://github.com/home-assistant/intents/tree/main/tests) folder, open the subfolder for your language.
* Open the file of interest.
![Sentences definition for turning on the light](/images/assist/assist-sentence-definition-01.png)
* () mean alternative elements.
* [] mean optional elements.
* <> mean an expansion rule. The view these rules, search for `expansion_rules` in the [_common.yaml](https://github.com/home-assistant/intents/blob/main/sentences/en/_common.yaml) file.
* The syntax is explained in detail in the [template sentence syntax documentation](https://developers.home-assistant.io/docs/voice/intent-recognition/template-sentence-syntax).

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB