Filter by supported features for todo services (#106241)

pull/104931/head^2
Bram Kragten 2023-12-22 21:22:16 +01:00 committed by GitHub
parent 3a744d374b
commit 7ba1736637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -26,14 +26,23 @@ add_item:
selector: selector:
text: text:
due_date: due_date:
filter:
supported_features:
- todo.TodoListEntityFeature.SET_DUE_DATE_ON_ITEM
example: "2023-11-17" example: "2023-11-17"
selector: selector:
date: date:
due_datetime: due_datetime:
filter:
supported_features:
- todo.TodoListEntityFeature.SET_DUE_DATETIME_ON_ITEM
example: "2023-11-17 13:30:00" example: "2023-11-17 13:30:00"
selector: selector:
datetime: datetime:
description: description:
filter:
supported_features:
- todo.TodoListEntityFeature.SET_DESCRIPTION_ON_ITEM
example: "A more complete description of the to-do item than that provided by the summary." example: "A more complete description of the to-do item than that provided by the summary."
selector: selector:
text: text:
@ -62,14 +71,23 @@ update_item:
- needs_action - needs_action
- completed - completed
due_date: due_date:
filter:
supported_features:
- todo.TodoListEntityFeature.SET_DUE_DATE_ON_ITEM
example: "2023-11-17" example: "2023-11-17"
selector: selector:
date: date:
due_datetime: due_datetime:
filter:
supported_features:
- todo.TodoListEntityFeature.SET_DUE_DATETIME_ON_ITEM
example: "2023-11-17 13:30:00" example: "2023-11-17 13:30:00"
selector: selector:
datetime: datetime:
description: description:
filter:
supported_features:
- todo.TodoListEntityFeature.SET_DESCRIPTION_ON_ITEM
example: "A more complete description of the to-do item than that provided by the summary." example: "A more complete description of the to-do item than that provided by the summary."
selector: selector:
text: text:

View File

@ -88,6 +88,7 @@ def _base_components() -> dict[str, ModuleType]:
media_player, media_player,
remote, remote,
siren, siren,
todo,
update, update,
vacuum, vacuum,
water_heater, water_heater,
@ -106,6 +107,7 @@ def _base_components() -> dict[str, ModuleType]:
"media_player": media_player, "media_player": media_player,
"remote": remote, "remote": remote,
"siren": siren, "siren": siren,
"todo": todo,
"update": update, "update": update,
"vacuum": vacuum, "vacuum": vacuum,
"water_heater": water_heater, "water_heater": water_heater,