mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-01 13:37:47 +00:00
Conert shopping-list update to WebSockets (#2114)
This commit is contained in:
parent
bb8ec4b2ef
commit
21be35bc46
@ -16,7 +16,9 @@ export const saveEdit = (
|
||||
itemId: number,
|
||||
name: string
|
||||
): Promise<ShoppingListItem> =>
|
||||
hass.callApi("POST", "shopping_list/item/" + itemId, {
|
||||
hass.callWS({
|
||||
type: "shopping_list/items/update",
|
||||
item_id: itemId,
|
||||
name,
|
||||
});
|
||||
|
||||
@ -25,7 +27,9 @@ export const completeItem = (
|
||||
itemId: number,
|
||||
complete: boolean
|
||||
): Promise<void> =>
|
||||
hass.callApi("POST", "shopping_list/item/" + itemId, {
|
||||
hass.callWS({
|
||||
type: "shopping_list/items/update",
|
||||
item_id: itemId,
|
||||
complete,
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user