From a4788800a06cbf619916dfa46bbd7aac26131be2 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Wed, 29 Nov 2023 04:16:39 -0800 Subject: [PATCH] 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 --- source/_integrations/todo.markdown | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/source/_integrations/todo.markdown b/source/_integrations/todo.markdown index 4de30a98f67..aa411027535 100644 --- a/source/_integrations/todo.markdown +++ b/source/_integrations/todo.markdown @@ -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