Assist: add glossary tooltip for intent (#27244)

This commit is contained in:
c0ffeeca7 2023-05-03 18:29:16 +02:00 committed by GitHub
parent 3e0b522080
commit 67706fa7ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ In English, you can say things like "turn on kitchen lights" or "turn off lights
## Adding custom sentences
You can add your own [sentence templates](https://developers.home-assistant.io/docs/voice/intent-recognition/template-sentence-syntax) to teach Home Assistant about new sentences. These sentences can work with the [built-in intents](https://developers.home-assistant.io/docs/intent_builtin/) or trigger a custom action by defining custom intents with the [intent script integration](/integrations/intent_script/).
You can add your own [sentence templates](https://developers.home-assistant.io/docs/voice/intent-recognition/template-sentence-syntax) to teach Home Assistant about new sentences. These sentences can work with the [built-in intents](https://developers.home-assistant.io/docs/intent_builtin/) or trigger a custom action by defining custom {% term intents %} with the [intent script integration](/integrations/intent_script/).
To get started, create a `custom_sentences/<language>` directory in your Home Assistant `config` directory where `<language>` is the [language code](https://developers.home-assistant.io/docs/voice/intent-recognition/supported-languages) of your language, such as `en` for English. These YAML files are automatically merged, and may contain intents, lists, or expansion rules.
@ -53,7 +53,7 @@ intents:
{% endraw %}
To teach Home Assistant how to handle the custom `CustomOutsideHumidity` intent, create an `intent_script` entry in your `configuration.yaml` file:
To teach Home Assistant how to handle the custom `CustomOutsideHumidity` {% term intent %}, create an `intent_script` entry in your `configuration.yaml` file:
{% raw %}
@ -72,7 +72,7 @@ More complex [actions](/docs/scripts/) can be done in `intent_script`, such as c
## Extending built-in intents
Extending the built-in intents, such as `HassTurnOn` and `HassTurnOff`, can be done as well.
Extending the built-in {% term intents %}, such as `HassTurnOn` and `HassTurnOff`, can be done as well.
For example, create the file `config/custom_sentences/en/on_off.yaml` and add:

View File

@ -36,7 +36,7 @@ To get an idea of the specific sentences that are supported for your language, y
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 second part of the file name shows the {% term 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)