I have created a sensor that produces a google map url using a secrets and the device_tracker lat and long values, this sensor seems to work in as much as I have used the output to display the appropriate map in a iframe tester.
I then want to display this map in a iframe card in lovelace (https hassio & https iframe url) but it just brings up a iframe of the hassio lovelace frontend again (if you login you are looking at the same lovelace page inside the iframe).
is there a trick to this?
the code looks like the following
in secrets.yaml file (I have xād out my google maps embed API key)
simon_map_key: https://www.google.com/maps/embed/v1/place?key=XXXXXXXX&q={{ states.device_tracker.sphone.attributes.latitude }},{{ states.device_tracker.sphone.attributes.longitude }}
in sensor.yaml file
- platform: template
sensors:
simon_map:
value_template: !secret simon_map_key
in ui-lovelace.yaml file
- type: iframe
url: sensor.simon_map
aspect_ratio: 100%
Anyone know how to get this to display?