How create weblink based on tracker info

Hello,

I want to create a weblink that shows where a person is on google map.

I tried this, but this doesn’t work :

type: entities
entities:
  - type: weblink
    name: Alex
    url: >-
      https://www.google.com/maps/place/{{
      state_attr('device_tracker.alex','latitude') }},{{
      state_attr('device_tracker.alex', 'longitude') }}
 

Any idea ?

Place the row inside config-template-card.

Meanwhile I used a Markdown Card :wink: