Add documentation for todo.get_items service (#29678)

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
Allen Porter 2023-11-15 02:42:04 -08:00 committed by GitHub
parent fc789c2379
commit f5a08fc249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,26 @@ incomplete items in the list.
Some To-do List integrations allow Home Assistant to manage the To-do Items in the list. The 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/). 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.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:
| Service data attribute | Optional | Description | Example |
| ---------------------- | -------- | ----------- | --------|
| `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:
```yaml
service: todo.get_items
target:
entity_id: todo.personal_tasks
data:
status:
- needs_action
```
### Service `todo.add_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: 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: