Hi! I would love to get some help with configuring HTML5 push notifications.
Let’s use the example from the component description:
{
"message": "Anne has arrived home",
"data": {
"actions": [
{
"action": "open",
"icon": "/static/icons/favicon-192x192.png",
"title": "Open Home Assistant"
},
{
"action": "open_door",
"title": "Open door"
}
]
}
}
Putting this in the ‘call service’ page in the frontend works perfectly; the actions show every time and the notification gets replaced with the new one because of the tag.
This translates to YAML like this (please correct me if I’m wrong):
automation:
- alias: test
trigger:
platform: state
entity_id: sun.sun
state: 'above_horizon'
action:
- service: notify.html5
data:
message: "Anne has arrived home"
data:
tag: "test-notification"
actions:
- action: "open"
icon: "/static/icons/favicon-192x192.png"
title: "Open Home Assistant"
- action: "open_door"
title: "Open door"
When manually triggering this from the ‘states’ page in the frontend, something weird happens. First time after restarting hass it works fine and the actions are visible in the notification. After the first time it doesn’t show the actions anymore and the notification doesn’t get replaced with the new one.
The same happens when passing the JSON as service data. The call to Google’s servers is encoded in the logs so I wasn’t able to get any information from that.
Does anyone have an idea what might cause this?
Thanks in advance!