Rename service-calls file to perform-actions to align terminology (#34254)

This commit is contained in:
c0ffeeca7
2024-08-12 09:47:01 +02:00
committed by GitHub
parent 68e2af27b4
commit 4f6a76ba16
24 changed files with 66 additions and 65 deletions

View File

@@ -19,7 +19,7 @@ This integration allows you to write Python scripts that are exposed as actions
| `time` | The stdlib `time` available as limited access. |
| `datetime` | The stdlib `datetime` available as limited access. |
| `dt_util` | The ` homeassistant.util.dt` module. |
| `output` | An empty dictionary. Add items to return data as [`response_variable`](/docs/scripts/service-calls#use-templates-to-handle-response-data). |
| `output` | An empty dictionary. Add items to return data as [`response_variable`](/docs/scripts/perform-actions#use-templates-to-handle-response-data). |
Other imports like `min`, `max` are available as builtins. See the [python_script](https://github.com/home-assistant/core/blob/dev/homeassistant/components/python_script/__init__.py) source code for up-to-date information on the available objects inside the script.
@@ -137,7 +137,7 @@ current_forecast = hass.services.call("weather", "get_forecasts", service_data,
## Returning data
Python script itself can respond with data. Just add items to the `output` variable in your `python_script` and the whole dictionary will be returned. These can be used in automations to act upon the command results using [`response_variable`](/docs/scripts/service-calls#use-templates-to-handle-response-data).
Python script itself can respond with data. Just add items to the `output` variable in your `python_script` and the whole dictionary will be returned. These can be used in automations to act upon the command results using [`response_variable`](/docs/scripts/perform-actions#use-templates-to-handle-response-data).
```python
# hello_world.py