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)
I donāt think it can work. I think youāll have to make a custom ui page that reads the url from the state of your entity. That url is expecting a url, not an entity and it doesnāt automatically resolve it.
Anybody get this to work. Iām fairly new to HA but have seemed to get a lot of things working. But Iām not a coder by any means and the formatting/methods are quite foreign to me when it comes to jinga, etc.
I too am trying to get an Iframe card working with the url value pulled from a sensor attribute. I can used the template editor to figure out the correct way to pull the value from the sensor.
{{ state_attr(āsensor.xxxxxā, āmap_linkā) }} and I get this valueā¦
But, I canāt seem to figure out how to use the template with the url: input for the iframe card. Iāve tried many variations and it just doesnāt pull in the value to the url: inputā¦ If I manually copy the value above, it display google maps just like I want.
Yepp this works like a dream
Wanted to see the music-map relations besides a media-player card to know when to manually interrupt in case the LMS does drift away from related artists with itās dynamic created playlist.
If only I could think of a way to select one of the shown entries and force the LMS to rethink itās strategy by playing a title of the selected artist. Have to think about that the next days if being possible.
thanks to the config-template-card and the card-mod only a few lines made this possible
and you need the media_player integration. the additional volume sliders are done using the mini-media-player. Didnāt use that for the primary one since I disliked the way it does the coverart thought.
ok, granted itās a quick hack for the css part ā¦
the sensor turns the artist into the required string, replaces spaces by + and itās used to catch the event when the next artist gets played so that the iframe gets updated
ok the page remainss blank in case music-map doesnāt know about an artist.
But since it took me a while grabbing ideas from multiple posts in here I wanted to share the result I ended up with today.