Add To-do due date/time and description service calls (#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>
This commit is contained in:
Allen Porter 2023-11-29 04:16:39 -08:00 committed by GitHub
parent 4866ff3fc1
commit a4788800a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,6 +60,11 @@ Add a new to-do item. A to-do list `target` is selected with a [Target Selector]
| Service 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.
Only one of `due_date` or `due_datetime` may be specified.
This is a full example of service call in YAML:
@ -68,8 +73,9 @@ service: todo.add_item
target:
entity_id: todo.personal_tasks
data:
item: "Submit income tax return"
```
item: "Submit Income Tax Return"
due_date: "2024-04-10"
description: "Collect all necessary documents and submit the final return."
### Service `todo.update_item`
@ -77,12 +83,14 @@ Update a to-do item. A to-do list `target` is selected with a [Target Selector](
| Service 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`
| `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. This is a full example of
a service call that updates the status and the name of a to-do item.
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.
```yaml
service: todo.update_item