mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-14 12:56:54 +00:00
Mention name
property for services.yaml (#16788)
This commit is contained in:
parent
3568a20ff5
commit
a42cc9f1ab
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user