Waze Live map how does it work?

I tried following your example, but cannot get the card visible…
Here it is my code:

      - type: custom:config-template-card
        card:
          type: iframe
          aspect_ratio: 100%
          url: "${ vars[0] }"
          style: |
            ha-card {
            font-size: 14px;
            font-family: 'Georgia';
            font-weight: normal;
            border: solid 2px var(--primary-color);
            }     
        entities:
          - entity: binary_sensor.person_fha_url
            name: Fha
          - entity: binary_sensor.person_maurizio_url
            name: Maurizio
        variables:
          - states['binary_sensor.person_fha_url'].attribute.url
          - states['binary_sensor.person_maurizio_url'].attribute.url

The binary sensors are created and the attributes show the correct position in the map.
Why cannot see the card?

Thanks petro, I got it working.
Just a note, it should be states[‘binary_sensor.person_xxx_url’].attributes.url instead of attribute.
I appreciate the help!

Change .attribute. to .attributes.

1 Like

Thanks for that, i’ll update the post

I did the change, but still no iframe showed…
Maybe something wrong in my side about variables?
Do i need to add something in configuration to have the variables?

Post your binary sensors

Here they are @petro :

- platform: template
  sensors:
    person_fha_url:
      value_template: "{{ state_attr('person.fha', 'latitude') and state_attr('person.fha', 'longitude') }}"
      attribute_templates:
        url: >
          {% set lat = state_attr('person.fha', 'latitude') %}
          {% set lon = state_attr('person.fha', 'longitude') %}
          {% set zoom = 3 %}
          https://embed.waze.com/it/iframe?zoom={{ zoom }}&lat={{ lat }}&lon={{ lon }}&pin=1&desc=1" width="600" height="450"
    person_maurizio_url:
      value_template: "{{ state_attr('person.maurizio', 'latitude') and state_attr('person.maurizio', 'longitude') }}"
      attribute_templates:
        url: >
          {% set lat = state_attr('person.maurizio', 'latitude') %}
          {% set lon = state_attr('person.maurizio', 'longitude') %}
          {% set zoom = 3 %}
          https://embed.waze.com/it/iframe?zoom={{ zoom }}&lat={{ lat }}&lon={{ lon }}&pin=1&desc=1" width="600" height="450"

your problem is all that crap at the end of each URL

That’s not part of the URL in the table above. That’s part of the html. Don’t have that in your binary_sensors.

Hi all!

I have an issue with displaying Waze in Iframe in Google Chrome. There is just an empty space, though Waze is displayed in Iframe in Microsoft Edge. I’ve tried cleaning cache and reset settings in Google Chrome, but it didn’t help.

Could anyone suggest me a solution? Thanks!

No way… i put off those entries from the binary sensors, but still getting no card…
EDIT: I discovered if i put this line into the model editor:

value_template: "{{ state_attr('person.fha', 'latitude') and state_attr('person.fha', 'longitude') }}"

I get this:

Why only the longitude attribute is rendered?
That’s why i get no card in the frontend?
How to fix?

That has nothing to do with it. What does the url attribute on person_fha_url display?

This:

and if you copy and paste the url into a browser, does it work?

Yes, it works…

Then you aren’t properly creating a lovelace iFrame while using the template card.

That’s what i have in the ui-lovelace:

      - type: custom:config-template-card
        variables:
          - states['binary_sensor.person_fha_url'].attributes.url
        entities:
          - binary_sensor.person_fha_url
        card:
        type: iframe
        url: "${ vars[0] }"
        style: |
          ha-card {
          font-size: 14px;
          font-family: 'Georgia';
          font-weight: normal;
          border: solid 2px var(--primary-color);
          }

What’s wrong?

Do you have the config-template-card installed?

Yes, of course…

  - url: /community_plugin/config-template-card/config-template-card.js
    type: module

Then it should be working. What is it doing right now? Is it showing the Iframe but not updating?

No, i get NO iframe card.