Repository navigation
Add subtask support to the To-do list entity model #1453
ContextThe To-do list platform models a list as a flat sequence of
Typical use cases: a shopping list grouped by aisle or store, a recipe broken into steps, a project checklist where the parent is only done when its children are, or simply seeing in Home Assistant what the user already created in the source app. This proposal covers the entity model change only. No integration is changed by it, so the contract can be agreed on before backends adopt it. ProposalAdd one optional field to
Add a feature flag so entities can advertise support:
And a service field on
action: todo.add_item
target:
entity_id: todo.shopping_list
data:
item: Milk
parent: DairySerialization needs no change: Hierarchy rulesSubtasks are limited to a single level.
The last two rules are what keep the tree from ever growing a third level, and together they also make cycles structurally impossible: a parent is always a root, so no chain longer than one edge can exist. A subtask can still be moved to a different top-level parent. Why one levelEvery backend listed above supports exactly one level in practice — Google Tasks enforces it in its API, and the CalDAV clients people actually use render it that way. It is also what the to-do card renders. Allowing arbitrary depth in core would mean every backend has to either flatten or reject deeper trees on write, which pushes the inconsistency out to integrations instead of resolving it. A depth limit can be relaxed later without breaking the field; going the other way would be a breaking change. Why a uid pointer rather than nested childrenAn alternative shape is
Why on the item rather than a separate service
Out of scope
Implementation |
Replies: 3 comments 1 reply
|
The proposal of adding subtasks in line with the RFC is solid. Aside: The proposal gets many of the nuanced details right around how to handle parent references in services: we do not expose the concept of a "uid" in the services today, so using the item name like this is the consistent choice. Most rfc5545 related proposals miss this. |
|
CalDAV would use this too. I maintain a custom CalDAV integration that already does subtasks this way, with the same home-assistant/core#180732 was closed while this waits. @MartinHjelmare could it go on the agenda of an architecture meeting, like #1349? |
|
This proposal was approved in the architecture meeting on 2026-11-05. |
This proposal was approved in the architecture meeting on 2026-11-05.