mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Rename todo's services and their fields (#29611)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
d385a681e0
commit
82398e168f
@ -34,24 +34,22 @@ incomplete items in the list.
|
||||
Some To-do List integrations allow Home Assistant to manage the To-do Items in the list. The
|
||||
services provided by some To-do List entities are described below or you can read more about [Service Calls](/docs/scripts/service-calls/).
|
||||
|
||||
### Service `todo.create_item`
|
||||
### Service `todo.add_item`
|
||||
|
||||
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:
|
||||
|
||||
| Service data attribute | Optional | Description | Example |
|
||||
| ---------------------- | -------- | ----------- | --------|
|
||||
| `summary` | no | A short summary or subject for the To-do Item. | Submit Income Tax Return
|
||||
| `status` | yes | The overall status of the To-do Item. | `needs_action` or `completed`
|
||||
| `item` | no | the name of the to-do Item. | Submit income tax return
|
||||
|
||||
This is a full example of service call in YAML:
|
||||
|
||||
```yaml
|
||||
service: todo.create_item
|
||||
service: todo.add_item
|
||||
target:
|
||||
entity_id: todo.personal_tasks
|
||||
data:
|
||||
summary: "Submit Income Tax Return"
|
||||
status: "needs_action"
|
||||
item: "Submit Income Tax Return"
|
||||
```
|
||||
|
||||
### Service `todo.update_item`
|
||||
@ -60,38 +58,37 @@ Update a To-do Item. A To-do list `target` is selected with a [Target Selector](
|
||||
|
||||
| Service data attribute | Optional | Description | Example |
|
||||
| ---------------------- | -------- | ----------- | --------|
|
||||
| `uid` | yes | The Unique identifier of the To-do Item to update. | `bY1PVzZkni1qQQlkanTvBA`
|
||||
| `summary` | yes | A short summary or subject for the To-do Item. | Submit Income Tax 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`
|
||||
|
||||
To-do Items can be identified using either a `uid` or `summary`. This is a full example of
|
||||
a service call that updates the status of a To-do Item based on the name.
|
||||
At least one of `rename` or `status` is required. This is a full example of
|
||||
a service call that updates the status and the name of a to-do Item.
|
||||
|
||||
```yaml
|
||||
service: todo.update_item
|
||||
target:
|
||||
entity_id: todo.personal_tasks
|
||||
data:
|
||||
summary: "Submit Income Tax Return"
|
||||
item: "Submit income tax return"
|
||||
rename: "Something else"
|
||||
status: "completed"
|
||||
```
|
||||
|
||||
### Service `todo.delete_item`
|
||||
### Service `todo.remove_item`
|
||||
|
||||
Delete 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:
|
||||
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:
|
||||
|
||||
| Service data attribute | Optional | Description | Example |
|
||||
| ---------------------- | -------- | ----------- | --------|
|
||||
| `uid` | yes | The Unique identifier of the To-do Item to update. | `bY1PVzZkni1qQQlkanTvBA`
|
||||
| `summary` | yes | A short summary or subject for the To-do Item. | Submit Income Tax Return
|
||||
| `item` | yes | The name of the to-do Item. | Submit income tax return
|
||||
|
||||
To-do Items can be identified using either a `uid` or `summary`. This is a full example of
|
||||
a service call that delete's a To-do Item with the specified name.
|
||||
This is a full example of a service call that deletes a to-do Item with the specified name.
|
||||
|
||||
```yaml
|
||||
service: todo.delete_item
|
||||
target:
|
||||
entity_id: todo.personal_tasks
|
||||
data:
|
||||
summary: "Submit Income Tax Return"
|
||||
item: "Submit income tax return"
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user