Service notify.mobile_app - Allow Templates for data url/clickAction

If Templates for Notifications would be allowed, one could construct URLs to lead directly to the specific Pages.

For Example: This Notification fires when a Battery runs out. With one Click, the User can directly open the specific Devices’ Overview:

service: notify.mobile_app_mobile
  message: The Battery {{trigger.entity_id}} is "unknown/unavailable"
  url: "{{'/config/devices/device/' + device_id('trigger.entity_id')}}"
  clickAction: "{{'/config/devices/device/' + device_id('trigger.entity_id')}}"

The value of any key under the data: key can be templated.

You don’t appear to be using the correct keys though. See: Actionable Notifications | Home Assistant Companion Docs

e.g. When I enter a zone I have defined around a shop and there are items in that shopping/todo list I get this notification that allows me to directly open the relevant todo list:

  - service: notify.mobile_app_iphone13
      message: "🛒 Time to shop? (long click to open list)"
          - action: URI
            title: View shopping list
            uri: "/todo?entity_id=todo.{{}}"
1 Like

You’re totally right, Thanks.
I did some terrible mistake :crazy_face:
Will delete it later, to avoid Traps for other users :slight_smile:

Don’t do that.
It may help other users.

1 Like