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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 66 additions and 65 deletions

View File

@ -489,7 +489,7 @@
entities for organic, paper, and packaging waste. In terms of functionality,
the information service is like a device. It is called *service* to avoid
confusion, as it does not come with a piece of hardware.
link: /docs/scripts/service-calls/
link: /docs/scripts/perform-actions/
aliases:
- services
- term: State

View File

@ -63,7 +63,7 @@ action:
The options that can be used with the `trigger` object are listed under [automation trigger variables](/docs/automation/templating/#available-trigger-data).
In this example, a [state trigger](/docs/automation/templating/#state) is used.
`turn_on` and `turn_off` are [`homeassistant` actions](/docs/scripts/service-calls/#homeassistant-actions). They are not tied to a specific domain. You can use them on lights, switches, and other domains.
`turn_on` and `turn_off` are [`homeassistant` actions](/docs/scripts/perform-actions/#homeassistant-actions). They are not tied to a specific domain. You can use them on lights, switches, and other domains.
### Creating the blueprint file

View File

@ -1006,7 +1006,7 @@ will not be used by anything.
[Script integration]: /integrations/script/
[automations]: /docs/automation/action/
[Alexa/Amazon Echo]: /integrations/alexa/
[actions page]: /docs/scripts/service-calls/
[actions page]: /docs/scripts/perform-actions/
[conditions page]: /docs/scripts/conditions/
[shorthand-template]: /docs/scripts/conditions/#template-condition-shorthand-notation
[script variables]: /integrations/script/#configuration-variables

View File

@ -41,7 +41,7 @@
{% icon "mdi:script-text" %} {% active_link /docs/scripts/ Scripts %}
{% if doc == 'scripts' or include.docs_index %}
<ul>
<li>{% active_link /docs/scripts/service-calls/ Actions %}</li>
<li>{% active_link /docs/scripts/perform-actions/ Actions %}</li>
<li>{% active_link /docs/scripts/conditions/ Conditions %}</li>
</ul>
{% endif %}

View File

@ -142,7 +142,7 @@ automation:
## Actions
Some calendar {% term integrations %} allow Home Assistant to manage your calendars
directly using {% term actions %}. The actions provided by some calendar {% term entity %} are described below or you can read more about [actions](/docs/scripts/service-calls/).
directly using {% term actions %}. The actions provided by some calendar {% term entity %} are described below or you can read more about [actions](/docs/scripts/perform-actions/).
### Action `calendar.create_event`
@ -193,7 +193,7 @@ data:
### Action `calendar.get_events`
This action populates [Response Data](/docs/scripts/service-calls#use-templates-to-handle-response-data)
This action populates [Response Data](/docs/scripts/perform-actions#use-templates-to-handle-response-data)
with calendar events within a date range. It can return events from multiple calendars.
| Data attribute | Optional | Description | Example |

View File

@ -166,7 +166,7 @@ Send a message to a conversation agent for processing.
| `agent_id` | yes | ID of conversation agent. The conversation agent is the brains of the assistant. It processes the incoming text commands. |
| `conversation_id` | yes | ID of a new or previous conversation. Will continue an old conversation or start a new one. |
This action is able to return [response data](/docs/scripts/service-calls/#use-templates-to-handle-response-data). The response is the same response as for the
This action is able to return [response data](/docs/scripts/perform-actions/#use-templates-to-handle-response-data). The response is the same response as for the
[`/api/conversation/process` API](https://developers.home-assistant.io/docs/intent_conversation_api#conversation-response).
## Action `conversation.reload`

View File

@ -68,7 +68,7 @@ For the dynamic gas prices, only entities are created that display the
## Actions
The energy and gas prices are exposed using [actions](/docs/scripts/service-calls/). The actions populate [response data](/docs/scripts/service-calls#use-templates-to-handle-response-data) with price data.
The energy and gas prices are exposed using [actions](/docs/scripts/perform-actions/). The actions populate [response data](/docs/scripts/perform-actions#use-templates-to-handle-response-data) with price data.
### Action `easyenergy.get_gas_prices`

View File

@ -57,18 +57,18 @@ For the dynamic gas prices, only entities are created that display the
## Actions
The energy and gas prices are exposed using [actions](/docs/scripts/service-calls/). The actions populate [Response Data](/docs/scripts/service-calls#use-templates-to-handle-response-data) with price data.
The energy and gas prices are exposed using [actions](/docs/scripts/perform-actions/). The actions populate [Response Data](/docs/scripts/perform-actions#use-templates-to-handle-response-data) with price data.
### Action `energyzero.get_gas_prices`
Fetches the gas prices. The `config_entry` value be found using the **Actions** tab in the **Developer Tools**, selecting the desired entity and then switching to YAML.
| Data attribute | Optional | Description | Example |
| ---------------------- | -------- | ----------- | --------|
| `config_entry` | no | Config entry to use. | 1b4a46c6cba0677bbfb5a8c53e8618b0
| `incl_vat` | no | Defines whether the prices include or exclude VAT. | false
| `start` | yes | Start time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00
| `end` | yes | End time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00
| Data attribute | Optional | Description | Example |
| -------------- | -------- | ---------------------------------------------------- | -------------------------------- |
| `config_entry` | no | Config entry to use. | 1b4a46c6cba0677bbfb5a8c53e8618b0 |
| `incl_vat` | no | Defines whether the prices include or exclude VAT. | false |
| `start` | yes | Start time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00 |
| `end` | yes | End time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00 |
### Response data
@ -98,12 +98,12 @@ The response data is a dictionary with the gas timestamps and prices as string a
Fetches the energy prices. The `config_entry` value be found using the **Actions** tab in the **Developer Tools**, selecting the desired entity and then switching to YAML.
| Data attribute | Optional | Description | Example |
| ---------------------- | -------- | ----------- | --------|
| `config_entry` | no | Config entry to use. Can be found using the **Actions** tab in the **Developer Tools** and switching to YAML. | 1b4a46c6cba0677bbfb5a8c53e8618b0
| `incl_vat` | no | Defines whether the prices include or exclude VAT. | false
| `start` | yes | Start time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00
| `end` | yes | End time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00
| Data attribute | Optional | Description | Example |
| -------------- | -------- | ------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| `config_entry` | no | Config entry to use. Can be found using the **Actions** tab in the **Developer Tools** and switching to YAML. | 1b4a46c6cba0677bbfb5a8c53e8618b0 |
| `incl_vat` | no | Defines whether the prices include or exclude VAT. | false |
| `start` | yes | Start time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00 |
| `end` | yes | End time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00 |
### Response data

View File

@ -97,7 +97,7 @@ This action isn't tied to any integration entry, so it won't use the model, prom
{% endtip %}
Allows you to ask Gemini Pro or Gemini Pro Vision to generate content from a prompt consisting of text and optionally images.
This action populates [response data](/docs/scripts/service-calls#use-templates-to-handle-response-data) with the generated content.
This action populates [response data](/docs/scripts/perform-actions#use-templates-to-handle-response-data) with the generated content.
| Data attribute | Optional | Description | Example |
| ---------------------- | -------- | ----------------------------------------------- | ------------------- |

View File

@ -55,7 +55,7 @@ The following entities are available for a Motionblinds Bluetooth device:
## Actions
Since Motionblinds Bluetooth motors require a Bluetooth connection to control them, Home Assistant does not get automatic updates of the motor's state by default. Therefore, you can use the [homeassistant.update_entity](https://www.home-assistant.io/docs/scripts/service-calls/#homeassistant-actions) action on any entity belonging to a Motionblinds Bluetooth device, which will connect to your Motionblinds Bluetooth motor and update the state of all entities belong to that device. However, be aware that doing so may impact battery life.
Since Motionblinds Bluetooth motors require a Bluetooth connection to control them, Home Assistant does not get automatic updates of the motor's state by default. Therefore, you can use the [homeassistant.update_entity](https://www.home-assistant.io/docs/scripts/perform-actions/#homeassistant-actions) action on any entity belonging to a Motionblinds Bluetooth device, which will connect to your Motionblinds Bluetooth motor and update the state of all entities belong to that device. However, be aware that doing so may impact battery life.
This can also be automated using a YAML automation. For instance, the following automation connects to your Motionblind every 24 hours to update its state in Home Assistant:

View File

@ -82,7 +82,7 @@ You can use an OpenAI Conversation integration to [talk to Super Mario and, if d
### Action `openai_conversation.generate_image`
Allows you to ask OpenAI to generate an image based on a prompt. This action
populates [Response Data](/docs/scripts/service-calls#use-templates-to-handle-response-data)
populates [Response Data](/docs/scripts/perform-actions#use-templates-to-handle-response-data)
with the requested image.
| Data attribute | Optional | Description | Example |

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

View File

@ -47,7 +47,7 @@ The qBittorrent integration adds the following switch:
### Action `qbittorrent.get_torrents`
This action populates [Response Data](/docs/scripts/service-calls#use-templates-to-handle-response-data)
This action populates [Response Data](/docs/scripts/perform-actions#use-templates-to-handle-response-data)
with a dictionary of torrents based on the provided filter.
| Data attribute | Optional | Description | Example |
@ -66,7 +66,7 @@ The response data contains the field `torrents` which contains a dictionary of t
### Action `qbittorrent.get_all_torrents`
This action populates [Response Data](/docs/scripts/service-calls#use-templates-to-handle-response-data)
This action populates [Response Data](/docs/scripts/perform-actions#use-templates-to-handle-response-data)
with a dictionary of torrents based on the provided filter.
| Data attribute | Optional | Description | Example |

View File

@ -95,7 +95,7 @@ rest_command:
### Using REST command Response in automations
REST commands provide an action response in a dictionary containing `status` (containing the HTTP response code) and `content` containing the response body as text or JSON. This response can be accessed in automations using [`response_variable`](/docs/scripts/service-calls#use-templates-to-handle-response-data).
REST commands provide an action response in a dictionary containing `status` (containing the HTTP response code) and `content` containing the response body as text or JSON. This response can be accessed in automations using [`response_variable`](/docs/scripts/perform-actions#use-templates-to-handle-response-data).
The following example shows how the REST command response may be used in automations. In this case, checking the [Traefik API](https://doc.traefik.io/traefik/operations/api/) for errors.

View File

@ -54,7 +54,7 @@ A `0` exit code means the commands completed successfully without error. In case
## Response
Shell commands provide an action response in a dictionary containing `stdout`, `stderr`, and `returncode`. 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).
Shell commands provide an action response in a dictionary containing `stdout`, `stderr`, and `returncode`. 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).
## Examples

View File

@ -176,7 +176,7 @@ data:
id: 17752
```
This returns [Response Data](https://www.home-assistant.io/docs/scripts/service-calls#use-templates-to-handle-response-data) like the following:
This returns [Response Data](https://www.home-assistant.io/docs/scripts/perform-actions#use-templates-to-handle-response-data) like the following:
```yaml
id: 17752
@ -203,7 +203,7 @@ data:
name: discord
```
This returns [Response Data](https://www.home-assistant.io/docs/scripts/service-calls#use-templates-to-handle-response-data) like the following:
This returns [Response Data](https://www.home-assistant.io/docs/scripts/perform-actions#use-templates-to-handle-response-data) like the following:
```yaml
count: 1
@ -232,7 +232,7 @@ data:
path: "C:\\image.jpg"
```
This returns [Response Data](https://www.home-assistant.io/docs/scripts/service-calls#use-templates-to-handle-response-data) like the following:
This returns [Response Data](https://www.home-assistant.io/docs/scripts/perform-actions#use-templates-to-handle-response-data) like the following:
```yaml
id: abc123
@ -255,7 +255,7 @@ data:
url: "https://home-assistant.io"
```
This returns [Response Data](https://www.home-assistant.io/docs/scripts/service-calls#use-templates-to-handle-response-data) like the following:
This returns [Response Data](https://www.home-assistant.io/docs/scripts/perform-actions#use-templates-to-handle-response-data) like the following:
```yaml
id: abc123
@ -278,7 +278,7 @@ data:
key: "a"
```
This returns [Response Data](https://www.home-assistant.io/docs/scripts/service-calls#use-templates-to-handle-response-data) like the following:
This returns [Response Data](https://www.home-assistant.io/docs/scripts/perform-actions#use-templates-to-handle-response-data) like the following:
```yaml
id: abc123
@ -301,7 +301,7 @@ data:
text: "Hello"
```
This returns [Response Data](https://www.home-assistant.io/docs/scripts/service-calls#use-templates-to-handle-response-data) like the following:
This returns [Response Data](https://www.home-assistant.io/docs/scripts/perform-actions#use-templates-to-handle-response-data) like the following:
```yaml
id: abc123
@ -333,7 +333,7 @@ data:
command: "sleep"
```
This returns [Response Data](https://www.home-assistant.io/docs/scripts/service-calls#use-templates-to-handle-response-data) like the following:
This returns [Response Data](https://www.home-assistant.io/docs/scripts/perform-actions#use-templates-to-handle-response-data) like the following:
```yaml
id: abc123

View File

@ -138,7 +138,7 @@ unique_id:
required: false
type: string
action:
description: Define actions to be executed when the trigger fires. Optional. Variables set by the action script are available when evaluating entity templates. This can be used to interact with anything using actions, in particular actions with [response data](/docs/scripts/service-calls#use-templates-to-handle-response-data). [See action documentation](/docs/automation/action).
description: Define actions to be executed when the trigger fires. Optional. Variables set by the action script are available when evaluating entity templates. This can be used to interact with anything using actions, in particular actions with [response data](/docs/scripts/perform-actions#use-templates-to-handle-response-data). [See action documentation](/docs/automation/action).
required: false
type: list
sensor:
@ -786,7 +786,7 @@ template:
### Trigger based handling of action response data
This example demonstrates how to use an `action` to call a [action with response data](/docs/scripts/service-calls/#use-templates-to-handle-response-data)
This example demonstrates how to use an `action` to call a [action with response data](/docs/scripts/perform-actions/#use-templates-to-handle-response-data)
and use the response in a template.
{% raw %}

View File

@ -85,16 +85,16 @@ If you have a Tibber Pulse it will also show the electricity consumption in real
## Actions
The hourly prices are exposed using [actions](/docs/scripts/service-calls/). The actions populate [response data](/docs/scripts/service-calls#use-templates-to-handle-response-data) with price data.
The hourly prices are exposed using [actions](/docs/scripts/perform-actions/). The actions populate [response data](/docs/scripts/perform-actions#use-templates-to-handle-response-data) with price data.
### Action `tibber.get_prices`
Fetches hourly energy prices including price level.
| Data attribute | Optional | Description | Example |
| ---------------------- | -------- | ----------- | --------|
| `start` | yes | Start time to get prices. Defaults to today 00:00:00 | 2024-01-01 00:00:00 |
| `end` | yes | End time to get prices. Defaults to tomorrow 00:00:00 | 2024-01-01 00:00:00 |
| Data attribute | Optional | Description | Example |
| -------------- | -------- | ----------------------------------------------------- | ------------------- |
| `start` | yes | Start time to get prices. Defaults to today 00:00:00 | 2024-01-01 00:00:00 |
| `end` | yes | End time to get prices. Defaults to tomorrow 00:00:00 | 2024-01-01 00:00:00 |
#### Response data

View File

@ -45,15 +45,15 @@ item to a pre-configured to-do list.
## Actions
Some to-do list integrations allow Home Assistant to manage the to-do items in the list. The
actions provided by some to-do list entities are described below or you can read more about [actions](/docs/scripts/service-calls/).
actions provided by some to-do list entities are described below or you can read more about [actions](/docs/scripts/perform-actions/).
### Action `todo.get_items`
Get to-do items from a to-do list. A to-do list `target` is selected with a [target selector](/docs/blueprint/selectors/#target-selector). The `data` payload supports the following fields:
| Data attribute | Optional | Description | Example |
| ---------------------- | -------- | ----------------------------------------- | --------------------------- |
| `status` | yes | Only return to-do items with this status. | `needs_action`, `completed` |
| -------------- | -------- | ----------------------------------------- | --------------------------- |
| `status` | yes | Only return to-do items with this status. | `needs_action`, `completed` |
This is a full example that returns all to-do items that have not been completed:
@ -71,11 +71,11 @@ data:
Add a new to-do item. A to-do list `target` is selected with a [Target Selector](/docs/blueprint/selectors/#target-selector) and the `data` payload supports the following fields:
| Data attribute | Optional | Description | Example |
| ---------------------- | -------- | ---------------------------------------------------------------- | ------------------------------------------------------------ |
| `item` | no | the name of the to-do Item. | Submit income tax return |
| `due_date` | yes | The date the to-do item is expected to be completed. | 2024-04-10 |
| `due_datetime` | yes | The date and time the to-do item is expected to be completed. | 2024-04-10 23:00:00 |
| `description` | yes | A more complete description than the one provided by the summary | Collect all necessary documents and submit the final return. |
| -------------- | -------- | ---------------------------------------------------------------- | ------------------------------------------------------------ |
| `item` | no | the name of the to-do Item. | Submit income tax return |
| `due_date` | yes | The date the to-do item is expected to be completed. | 2024-04-10 |
| `due_datetime` | yes | The date and time the to-do item is expected to be completed. | 2024-04-10 23:00:00 |
| `description` | yes | A more complete description than the one provided by the summary | Collect all necessary documents and submit the final return. |
Only one of `due_date` or `due_datetime` may be specified.
@ -96,13 +96,13 @@ data:
Update a to-do item. A to-do list `target` is selected with a [Target Selector](/docs/blueprint/selectors/#target-selector) and the `data` payload supports the following fields:
| Data attribute | Optional | Description | Example |
| ---------------------- | -------- | ----------------------------------------------------------------- | ------------------------------------------------------------ |
| `item` | no | The name of the to-do Item to update. | Submit income tax return |
| `rename` | yes | The new name of the to-do Item. | Something else |
| `status` | yes | The overall status of the To-do Item. | `needs_action` or `completed` |
| `due_date` | yes | The date the to-do item is expected to be completed. | 2024-04-10 |
| `due_datetime` | yes | The date and time the to-do item is expected to be completed. | 2024-04-10 23:00:00 |
| `description` | yes | A more complete description than the one provided by the summary. | Collect all necessary documents and submit the final return. |
| -------------- | -------- | ----------------------------------------------------------------- | ------------------------------------------------------------ |
| `item` | no | The name of the to-do Item to update. | Submit income tax return |
| `rename` | yes | The new name of the to-do Item. | Something else |
| `status` | yes | The overall status of the To-do Item. | `needs_action` or `completed` |
| `due_date` | yes | The date the to-do item is expected to be completed. | 2024-04-10 |
| `due_datetime` | yes | The date and time the to-do item is expected to be completed. | 2024-04-10 23:00:00 |
| `description` | yes | A more complete description than the one provided by the summary. | Collect all necessary documents and submit the final return. |
At least one of `rename` or `status` is required. Only one of `due_date` or `due_datetime` may be specified. This is a full example that updates the status and the name of a to-do item.
@ -121,8 +121,8 @@ data:
Removing a to-do item. A to-do list `target` is selected with a [Target Selector](/docs/blueprint/selectors/#target-selector), and the `data` payload supports the following fields:
| Data attribute | Optional | Description | Example |
| ---------------------- | -------- | --------------------------- | ------------------------ |
| `item` | no | The name of the to-do item. | Submit income tax return |
| -------------- | -------- | --------------------------- | ------------------------ |
| `item` | no | The name of the to-do item. | Submit income tax return |
This is a full example that deletes a to-do Item with the specified name.

View File

@ -27,7 +27,7 @@ Notes:
## Action `waze_travel_time.get_travel_times`
This service populates [response data](/docs/scripts/service-calls#use-templates-to-handle-response-data)
This service populates [response data](/docs/scripts/perform-actions#use-templates-to-handle-response-data)
with route alternatives and travel times between two locations.
| Data attribute | Optional | Description | Example |

View File

@ -70,7 +70,7 @@ wind_speed_unit: km/h
## Action `weather.get_forecasts`
This action populates [response data](/docs/scripts/service-calls#use-templates-to-handle-response-data)
This action populates [response data](/docs/scripts/perform-actions#use-templates-to-handle-response-data)
with a mapping of weather services and their associated forecasts.
| Data attribute | Optional | Description | Example |

View File

@ -52,7 +52,7 @@ Additional categories can be added through the configuration to include optional
## Action `workday.check_date`
This action populates [Response Data](/docs/scripts/service-calls#use-templates-to-handle-response-data)
This action populates [Response Data](/docs/scripts/perform-actions#use-templates-to-handle-response-data)
providing feedback if the date is a workday or not.
| Data attribute | Required | Description | Example |

View File

@ -344,7 +344,8 @@ layout: null
/getting-started/installation-virtualenv /docs/installation/virtualenv
/getting-started/installation-raspberry-pi /docs/installation/raspberry-pi
/getting-started/scripts /docs/scripts
/getting-started/scripts-service-calls /docs/scripts/service-calls
/getting-started/scripts-service-calls /docs/scripts/perform-actions/
/docs/scripts/service-calls /docs/scripts/perform-actions/
/getting-started/scripts-conditions /docs/scripts/conditions
/getting-started/securing /docs/configuration/securing
/getting-started/updating /common-tasks/os