Curious waze minimap lat and long problem

This works, using google coordinates on the waze live embedded minimap :

 https://embed.waze.com/iframe?zoom=14&lat=51.356024759302514, -0.06329577618901593&pin=1&desc=1&ct=livemap

This, when i put it in the iframe card:

https://embed.waze.com/iframe?zoom=12&lat={{
  state_attr('person.car','latitude') }}&lon={{
  state_attr('person.car','longitude') }}&pin=1&desc=1&ct=livemap

Works fine in a regular browser (below is the output string developer tools gives when i give above as input):

https://embed.waze.com/iframe?zoom=12&lat=51.469629&lon=-0.396927&pin=1&desc=1&ct=livemap

but not in the minimap. The only difference i can see is that i get about 12 digits less from the person entity then google maps coordinates give me.

I’m a slightly confused as to why it would render in a regular browser (clearly it can find the location) but not in the minimap. The url strings are the same as shown from the developer output. Does the minimap require google lat and long amount of digits maybe?

I suppose it’s possible that the iframe card doesn’t allow for this kind of substitution and i need to setup a separate sensor as per Waze Live map how does it work? - #16 by petro

You have to make a camera entity, you can’t use an iframe as it doesn’t support templates. Or you can go with what I posted in that link, which utilizes the config-template-card.

This is an exmaple using a generic camera to create a google maps card, same principle, just using waze.

camera:
- name: My Location
  platform: generic
  still_image_url: >
    https://embed.waze.com/iframe?zoom=12&lat={{ state_attr('person.car','latitude') }}&lon={{ state_attr('person.car','longitude') }}&pin=1&desc=1&ct=livemap
  limit_refetch_to_url_change: true
1 Like

Ah nice. So even if i setup the binary sensor you posted in the other link, i still wouldn’t be able to refer to that url in the iframe card ?, e.g. i would have to use the config-template-card or the camera entity (and do it without a sensor.

I guess the camera solution is the quickest as it doesn’t require setting up another binary sensor?. What would you say is the best option ?

it’s whatever you want to use, they are just different ways of doing it.

1 Like

Cool and many thanks, now i can have live card of my car.