mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Support todoist task description in new_task service (#116203)
This commit is contained in:
parent
f8c1710753
commit
f258034f9c
@ -66,6 +66,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
NEW_TASK_SERVICE_SCHEMA = vol.Schema(
|
||||
{
|
||||
vol.Required(CONTENT): cv.string,
|
||||
vol.Optional(DESCRIPTION): cv.string,
|
||||
vol.Optional(PROJECT_NAME, default="inbox"): vol.All(cv.string, vol.Lower),
|
||||
vol.Optional(LABELS): cv.ensure_list_csv,
|
||||
vol.Optional(ASSIGNEE): cv.string,
|
||||
@ -225,6 +226,8 @@ def async_register_services(
|
||||
content = call.data[CONTENT]
|
||||
data: dict[str, Any] = {"project_id": project_id}
|
||||
|
||||
if description := call.data.get(DESCRIPTION):
|
||||
data["description"] = description
|
||||
if task_labels := call.data.get(LABELS):
|
||||
data["labels"] = task_labels
|
||||
|
||||
|
@ -5,6 +5,9 @@ new_task:
|
||||
example: Pick up the mail.
|
||||
selector:
|
||||
text:
|
||||
description:
|
||||
selector:
|
||||
text:
|
||||
project:
|
||||
example: Errands
|
||||
default: Inbox
|
||||
|
@ -29,6 +29,10 @@
|
||||
"name": "Content",
|
||||
"description": "The name of the task."
|
||||
},
|
||||
"description": {
|
||||
"name": "Description",
|
||||
"description": "A description for the task."
|
||||
},
|
||||
"project": {
|
||||
"name": "Project",
|
||||
"description": "The name of the project this task should belong to."
|
||||
|
Loading…
x
Reference in New Issue
Block a user