Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to new todo services #18477

Merged
merged 3 commits into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/data/todo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ export const updateItem = (
entity_id: string,
item: TodoItem
): Promise<ServiceCallResponse> =>
hass.callService("todo", "update_item", item, { entity_id });
hass.callService(
"todo",
"update_item",
{ item: item.uid, rename: item.summary, status: item.status },
{ entity_id }
);

export const createItem = (
hass: HomeAssistant,
Expand All @@ -70,9 +75,9 @@ export const createItem = (
): Promise<ServiceCallResponse> =>
hass.callService(
"todo",
"create_item",
"add_item",
{
summary,
item: summary,
},
{ entity_id }
);
Expand All @@ -84,9 +89,9 @@ export const deleteItem = (
): Promise<ServiceCallResponse> =>
hass.callService(
"todo",
"delete_item",
"remove_item",
{
uid,
item: uid,
},
{ entity_id }
);
Expand Down
Loading