I’m trying to create a button that will open to Google Maps using the device tracker GPS location.
I was hoping to use
tap_action:
action: url
url_path: "https://www.google.com/maps/place/{{ state_attr('device_tracker.my_phone', 'latitude') }},{{ state_attr('device_tracker.my_phone', 'longitude') }}"
but unfortunately this string doesn’t seem to be processed by the template processor. Any ideas on how to get this working?
With the config-template-card.
Nice example here:
That works! Another awesome trick in the toolbox, thanks!
@Mobius7 I am trying to do the same google maps link with an entity location but cannot make it work, could you share your code?
Is config-template-card still the best (only?) answer in Aug. 2024 or has something new developed in the last couple of years to achieve this?
Regardless, does anyone have an example of this (using a device state in a URL type action in a Card) they’d like to share?