mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
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:
parent
4866ff3fc1
commit
a4788800a0
@ -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 |
|
| Service data attribute | Optional | Description | Example |
|
||||||
| ---------------------- | -------- | ----------- | --------|
|
| ---------------------- | -------- | ----------- | --------|
|
||||||
| `item` | no | the name of the to-do Item. | Submit income tax return
|
| `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:
|
This is a full example of service call in YAML:
|
||||||
|
|
||||||
@ -68,8 +73,9 @@ service: todo.add_item
|
|||||||
target:
|
target:
|
||||||
entity_id: todo.personal_tasks
|
entity_id: todo.personal_tasks
|
||||||
data:
|
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`
|
### 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 |
|
| Service data attribute | Optional | Description | Example |
|
||||||
| ---------------------- | -------- | ----------- | --------|
|
| ---------------------- | -------- | ----------- | --------|
|
||||||
| `item` | no | The name of the to-do item to update. | 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
|
| `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`
|
| `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
|
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.
|
||||||
a service call that updates the status and the name of a to-do item.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
service: todo.update_item
|
service: todo.update_item
|
||||||
|
Loading…
x
Reference in New Issue
Block a user