Mention name property for services.yaml (#16788)

This commit is contained in:
Philip Allgaier 2021-03-31 15:28:59 +02:00 committed by GitHub
parent 3568a20ff5
commit a42cc9f1ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,12 +76,13 @@ The above `python_script` can be called using the following YAML as an input.
## Documenting your Python scripts
You can add descriptions for your Python scripts that will be shown in the Call Services tab of the Developer Options page. To do so, simply create a `services.yaml` file in your `<config>/python_scripts` folder. Using the above Python script as an example, the `services.yaml` file would look like:
You can add names and descriptions for your Python scripts that will be shown in the frontend. To do so, simply create a `services.yaml` file in your `<config>/python_scripts` folder. Using the above Python script as an example, the `services.yaml` file would look like:
```yaml
# services.yaml
turn_on_light:
description: Turn on a light and set its color.
name: Turn on light
description: Turn on a specific light and set its color.
fields:
entity_id:
description: The light that will be turned on.