From 82398e168fa9773f9e254f521863fae9edbd4489 Mon Sep 17 00:00:00 2001 From: Robert Resch Date: Mon, 30 Oct 2023 22:01:49 +0100 Subject: [PATCH] Rename todo's services and their fields (#29611) Co-authored-by: Franck Nijhof --- source/_integrations/todo.markdown | 33 ++++++++++++++---------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/source/_integrations/todo.markdown b/source/_integrations/todo.markdown index c8d94ab7d96..24ad3f41d63 100644 --- a/source/_integrations/todo.markdown +++ b/source/_integrations/todo.markdown @@ -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" ```