Skip to content

Commit a478880

Browse files
allenporterc0ffeeca7MartinHjelmare
authored
Add To-do due date/time and description service calls (home-assistant#29900)
* Add To-do due date/time and description * tiny tweaks * changing to datetime for consistency reasons following review comment by frenck. * Update source/_integrations/todo.markdown * Update remaining occurrences for due_date_time --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
1 parent 4866ff3 commit a478880

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

source/_integrations/todo.markdown

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ Add a new to-do item. A to-do list `target` is selected with a [Target Selector]
6060
| Service data attribute | Optional | Description | Example |
6161
| ---------------------- | -------- | ----------- | --------|
6262
| `item` | no | the name of the to-do Item. | Submit income tax return
63+
| `due_date` | yes | The date the to-do item is expected to be completed. | 2024-04-10
64+
| `due_datetime` | yes | The date and time the to-do item is expected to be completed. | 2024-04-10 23:00:00
65+
| `description` | yes | A more complete description than the one provided by the summary | Collect all necessary documents and submit the final return.
66+
67+
Only one of `due_date` or `due_datetime` may be specified.
6368

6469
This is a full example of service call in YAML:
6570

@@ -68,21 +73,24 @@ service: todo.add_item
6873
target:
6974
entity_id: todo.personal_tasks
7075
data:
71-
item: "Submit income tax return"
72-
```
76+
item: "Submit Income Tax Return"
77+
due_date: "2024-04-10"
78+
description: "Collect all necessary documents and submit the final return."
7379
7480
### Service `todo.update_item`
7581

7682
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:
7783

7884
| Service data attribute | Optional | Description | Example |
7985
| ---------------------- | -------- | ----------- | --------|
80-
| `item` | no | The name of the to-do item to update. | Submit income tax return
81-
| `rename` | yes | The new name of the to-do item. | Something else
82-
| `status` | yes | The overall status of the to-do item. | `needs_action` or `completed`
83-
84-
At least one of `rename` or `status` is required. This is a full example of
85-
a service call that updates the status and the name of a to-do item.
86+
| `item` | no | The name of the to-do Item to update. | Submit income tax return
87+
| `rename` | yes | The new name of the to-do Item. | Something else
88+
| `status` | yes | The overall status of the To-do Item. | `needs_action` or `completed`
89+
| `due_date` | yes | The date the to-do item is expected to be completed. | 2024-04-10
90+
| `due_datetime` | yes | The date and time the to-do item is expected to be completed. | 2024-04-10 23:00:00
91+
| `description` | yes | A more complete description than the one provided by the summary. | Collect all necessary documents and submit the final return.
92+
93+
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 of a service call that updates the status and the name of a to-do item.
8694

8795
```yaml
8896
service: todo.update_item

0 commit comments

Comments
 (0)