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
              data_template:              
                  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] }}
                    https://ip-api.com/#{{ states.persistent_notification.http_login.attributes.message.split("from ")[1] }}
                  data:
                    actions:
                    - action: "URI"
                      title: "Informações do IP"
                      uri: https://ip-api.com/#{{ states.persistent_notification.http_login.attributes.message.split("from ")[1] }}

But when you open the link it will

  • https://ip-api.com/#{{ 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?

Thanks

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

uri: 'https://ip-api.com/#{{ 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: