Notification with action URL Dynamic

Hello, I’m trying to send a notification with an action when the login fails, but I’m not able to put the dynamic URL, my code is:

            - service: notify.daniel
                  title: "🛡️ Tentativa de Login"
                  #{{ states.persistent_notification.http_login.attributes.message }} 
                  message: >
                    Tentativa em {{ now().strftime('%H:%m') }} 
                          IP: {{ states.persistent_notification.http_login.attributes.message.split("from ")[1] }}
          {{ states.persistent_notification.http_login.attributes.message.split("from ")[1] }}
                    - action: "URI"
                      title: "Informações do IP"
                      uri:{{ states.persistent_notification.http_login.attributes.message.split("from ")[1] }}

But when you open the link it will

  •{{ states.persistent_notification.http_login.attributes.message.split("from ")[1] }}

Dont replace {{ states.persistent_notification.http_login.attributes.message.split("from ")[1] }} with correct value!

Any help?


wrap the uri in quotation marks because it is a single line template

uri: '{{ states.persistent_notification.http_login.attributes.message.split("from ")[1] }}'

I am using single quotes here becuase you have double quotes inside the template.

Thanks Works :stuck_out_tongue:

When i try this to my android phone with a google maps uri i cant get it to work.
The template seems to translate fine in VScode, but when i click the link on my android phone it seems to have not translated the template.

(Screenshot from VScode)

(Screenshot from android phone)