Update shopping_list.markdown (#37405)

Added documentation of the "remove" action which is present in the shopping_list_updated event that is fired when an item is removed from the list. This was not present before (only add and update were).
This commit is contained in:
Tom Barrett 2025-02-11 07:54:45 +00:00 committed by GitHub
parent 73148cb2f3
commit 3f4e9f4a2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -81,8 +81,8 @@ Sort all items by name in the shopping list.
A `shopping_list_updated` event is triggered when items in the list are modified, with the following data payload attached to it. This can be used to trigger automations such as sending a push notification when someone adds an item to the shopping list, which when clicked, will open the list.
| Data payload attribute | Description |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `action` | What action was taken on the item. Either `add` for a new item being added, or `update` for an item being updated. |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `action` | What action was taken on the item. Either `add` for a new item being added, `update` for an item being updated, or `remove` for an item being removed. |
| `item` | A dictionary containing details of the item that was updated. |
| `item.id` | A unique ID for this item |
| `item.name` | The text attached to the item, for example `Milk` |