From d539ccf828ac85a4eb58741309714afb34114fab Mon Sep 17 00:00:00 2001 From: "Mr. Bubbles" Date: Tue, 30 Apr 2024 07:03:27 +0200 Subject: [PATCH] Documentation for notification service in Bring integration (#31522) * Update to changes in base PR * update text to changes in the Bring! app * Tiny style tweaks --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/bring.markdown | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/source/_integrations/bring.markdown b/source/_integrations/bring.markdown index 062b6804f43..4adf1643c18 100644 --- a/source/_integrations/bring.markdown +++ b/source/_integrations/bring.markdown @@ -29,3 +29,53 @@ The **Bring!** integration allows you to interact with your [Bring!](https://www For authentication, the integration requires the `email` and `password` you used for your Bring! account. If you want to automatically receive notifications via the Bring! app when Home Assistant adds or removes an item from the list, you should use a dedicated account (such as `email: your.name+ha@gmail.com`) to connect Home Assistant with [Bring!](https://www.getbring.com/). {% include integrations/config_flow.md %} + +## Services + +You can use the services from the [to-do list](/integrations/todo/) to create, update, or delete items on your Bring! shopping lists. + +### Notifications + +The **Bring** integration offers a service to send push notifications to the Bring! mobile apps of other members of a shared shopping list. The Bring! mobile app has 4 predefined notification types. Note: If you want to receive these notifications yourself, you need to use a dedicated account as mentioned above. + +| Service data attribute | Optional | Description | +| ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `target` | no | Target Bring! list(s) whose members should be notified. | +| `message` | no | Type of push notification to send to list members. See [Notification types](#available-notification-types). | +| `item` | yes | **Required for `urgent_message`.** Article name to include in the message. For example: *Urgent Message - Please buy cilantro urgently*. | + +### Available notification types + +| Notification type | Text of notification | +| ----------------- | --------------------------------------------------- | +| going_shopping | I'm going shopping! - Last chance to make changes | +| changed_list | List updated - Take a look at the articles | +| shopping_done | Shopping done - The fridge is well stocked | +| urgent_message | Urgent Message - Please buy `Article name` urgently | + +### Sending a going shopping notification + +```yaml +... +action: + service: bring.send_message + target: + entity_id: todo.bring_shoppinglist + data: + message: going_shopping +``` + +### Sending an urgent message notification + +Note that for the notification type `urgent_message` the attribute `item` is **required**. + +```yaml +... +action: + service: bring.send_message + target: + entity_id: todo.bring_shoppinglist + data: + message: urgent_message + item: Cilantro +```