Hi, I am trying to configure the new HTML5 Push Notifications.
They work fine, as long as I only set a message. I get errors when I try to configure action buttons.
I can manually call the notification service using the developer tools and the provided example from https://home-assistant.io/components/notify.html5/ and the action buttons work fine.
I just can’t figure out how to implement this in the configuration.yaml without getting this error in the log file:
16-09-02 08:04:27 homeassistant.core: Invalid service data for notify.html5: extra keys not allowed @ data[‘actions’]. Got [OrderedDict([(‘action’, ‘button1’), (‘title’, ‘Lights ON’)]), OrderedDict([(‘action’, ‘button2’), (‘title’, ‘Lights OFF’)])]
Here’s what works from the “call service” developer tool:
{
"message": "Welcome home!",
"data": {
"actions": [
{
"action": "button1",
"title": "Lights ON"
},
{
"action": "button2",
"title": "Lights OFF"
}
]
}
}
And here’s what I think should work, but does not, in configuration.yaml:
- alias: "Notify I am home"
trigger:
platform: zone
event: enter
zone: zone.home
entity_id: device_tracker.patboud_nexus5
action:
service: notify.html5
data:
message: "Welcome home"
actions:
- action: "button1"
title: "Lights ON"
- action: "button2"
title: "Lights OFF"
Thank you for your help, really can’t figure that one out, even if it may seem obvious for some of you!
PatBoud