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>
This commit is contained in:
Mr. Bubbles 2024-04-30 07:03:27 +02:00 committed by GitHub
parent 29705d790e
commit 7cb885c316
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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/). 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 %} {% 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
```