From 93a8cfbb152ec9384c54ad5300030e72fa845802 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Sun, 2 Apr 2023 16:36:11 +0200 Subject: [PATCH 1/2] add sort list service --- source/_integrations/shopping_list.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/_integrations/shopping_list.markdown b/source/_integrations/shopping_list.markdown index 0873762b8721..df553788f67f 100644 --- a/source/_integrations/shopping_list.markdown +++ b/source/_integrations/shopping_list.markdown @@ -65,6 +65,14 @@ Mark all items as incomplete in the shopping list. Clear completed items from the shopping list. +### Service `shopping_list.sort_list` + +Sort all items by name in the shopping list. + +| Service data attribute | Optional | Description | +|------------------------|----------|---------------------------------------------------------------------| +| `sort_reverse` | yes | Whether to sort in reverse (_descending_) order. (default: `False`) | + ## 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. From 7233eef492ee11e8b4450b9c898a2b8687dba318 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Mon, 3 Apr 2023 10:25:01 +0200 Subject: [PATCH 2/2] use shorter names --- source/_integrations/shopping_list.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_integrations/shopping_list.markdown b/source/_integrations/shopping_list.markdown index df553788f67f..f5e2926cc89e 100644 --- a/source/_integrations/shopping_list.markdown +++ b/source/_integrations/shopping_list.markdown @@ -65,13 +65,13 @@ Mark all items as incomplete in the shopping list. Clear completed items from the shopping list. -### Service `shopping_list.sort_list` +### Service `shopping_list.sort` Sort all items by name in the shopping list. | Service data attribute | Optional | Description | |------------------------|----------|---------------------------------------------------------------------| -| `sort_reverse` | yes | Whether to sort in reverse (_descending_) order. (default: `False`) | +| `reverse` | yes | Whether to sort in reverse (_descending_) order. (default: `False`) | ## Using in Automations