mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Example on notification to open the shopping list (#15983)
This commit is contained in:
parent
b9e54d8a5c
commit
319bcba451
@ -43,3 +43,21 @@ You can add or remove items from your shopping list by using the following servi
|
|||||||
| Service data attribute | Optional | Description |
|
| Service data attribute | Optional | Description |
|
||||||
|------------------------|----------|--------------------------------------------------------|
|
|------------------------|----------|--------------------------------------------------------|
|
||||||
| `name` | no | Name of the item to mark as completed. Example: "Milk" |
|
| `name` | no | Name of the item to mark as completed. Example: "Milk" |
|
||||||
|
|
||||||
|
## Using in Automations
|
||||||
|
|
||||||
|
The simplest way use shopping list with automations (e.g., when entering a zone with shops) is to create a notification that can be clicked to open the shopping list.
|
||||||
|
This is tested to work with the Android companion app.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
service: notify.notify
|
||||||
|
title: "Time to shop?"
|
||||||
|
message: 'Click to open the shopping list'
|
||||||
|
data:
|
||||||
|
clickAction: '/shopping-list'
|
||||||
|
url: '/shopping-list'
|
||||||
|
```
|
||||||
|
|
||||||
|
{% endraw %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user