diff --git a/homeassistant/components/todoist/calendar.py b/homeassistant/components/todoist/calendar.py index 9b8d0a7c08f..e3f87043e02 100644 --- a/homeassistant/components/todoist/calendar.py +++ b/homeassistant/components/todoist/calendar.py @@ -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 diff --git a/homeassistant/components/todoist/services.yaml b/homeassistant/components/todoist/services.yaml index 9593b6bb6a4..1bd6320ebe3 100644 --- a/homeassistant/components/todoist/services.yaml +++ b/homeassistant/components/todoist/services.yaml @@ -5,6 +5,9 @@ new_task: example: Pick up the mail. selector: text: + description: + selector: + text: project: example: Errands default: Inbox diff --git a/homeassistant/components/todoist/strings.json b/homeassistant/components/todoist/strings.json index 0f81702a4d0..0cc74c9c8c6 100644 --- a/homeassistant/components/todoist/strings.json +++ b/homeassistant/components/todoist/strings.json @@ -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."