Create URL where a template sensor is part of the address

I need to create a button in HA which directs me to a site with dynamic IP address. This template is created in configuration.yaml and gives me the IP (part og the URL needed).

     ext_ip:
       unique_id: "external ip"
       value_template: "{{ states.sensor.myip.state }}"

I have tried different versions of this without success: url_path: < http://{{ sensor.ext_ip }}:9123

Any tip on how to create a dynamic URL for a push button (tap_action: / action: url / url_path:) where the dynamic IP is a part of the address and the rest is static?

You cannot use templates in default frontend cards.
I assume there are custom card able to do this, but I don’t know about them.

1 Like

Thanks for clarification. Possible to create a URL in config.yaml as a template?

Could it be text?

type: markdown
content: '[Ke placa](https://www.keplaca.com/placa/{{states(''sensor.ultima_placa'')}})'
title: ke Placas
1 Like

Thanks @walberjunior . Wonderful workaround solution.

type: markdown
content: >-
  [West - camera]
  (http://{{states('sensor.ext_ip')}}:9123)
title: West camera