#Notify Data: key
1 messages · Page 1 of 1 (latest)
The keys in the data: statement depend on the notify service you are using. I have no way of knowing that. You would need to share a link to the blueprint .
This is the blueprint: https://gist.github.com/Raukze/27fe0c6bf6d91b8ae2ab5e11880509ba
This is the community forum post: https://community.home-assistant.io/t/contact-sensor-door-or-window-left-open-notification/652571
The notify service can be configured dynamically via a selector. Usually this will be the notify-service via the companion app: https://companion.home-assistant.io/docs/notifications/notifications-basic/
I can tell you already know more about notify than I do, but the Docs for notify say under data:
On platforms who have extended functionality. See your platform page if it is supported.
So the service would need to be expecting a key to use the object you are sending it.
You might be able to just add a key name and the object item. Not sure what will happen, will it error, will it ignore it, will it be available in the service to do something with it, I don't know
Thanks for helping out. I think I'll have to go the trial and error route.
you'll have to do this:
variables:
click_action: !input notification_click_url
url: !input notification_click_ur
object_data: !input object_selector
Then in your service...
- service: "{{ notify_services_list[repeat.index-1] }}"
data:
message: !input notification_message
title: !input notification_title
data: >
{{ dict(clickAction=click_action, url=url, **object_data) }}
@quick cloak