Add sort list service to Shopping List (#26839)

This commit is contained in:
Michael 2023-04-03 21:35:10 +02:00 committed by GitHub
parent 092a395511
commit eae4e02a0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,6 +65,14 @@ Mark all items as incomplete in the shopping list.
Clear completed items from the shopping list. Clear completed items from the shopping list.
### Service `shopping_list.sort`
Sort all items by name in the shopping list.
| Service data attribute | Optional | Description |
|------------------------|----------|---------------------------------------------------------------------|
| `reverse` | yes | Whether to sort in reverse (_descending_) order. (default: `False`) |
## Using in Automations ## Using in Automations
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. 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.