Google Map Card

Hi,

Your feedbacks are important to me. Thank you in advanced.

Google Map Card

2 Likes

This card is great and i am loving how it is far superior to the map card, however the way the entities are added i am struggling to get tit to work with a person selector drop down box.

I have got it working on selecting a person to show the current location, however i cant add any of the variables that are entity specific.

Below is what i currently have

However i want to be able to see the historical routing like in the picture below

Now i don’t know if this is something that can be fixed in the custom:card_templater or the map yaml itself but any advice on how to fix it, or an alternative solution would be greatly appreciated

type: custom:vertical-stack-in-card
cards:
  - type: custom:mushroom-select-card
    entity: input_select.track_device
    fill_container: true
    layout: horizontal
    primary_info: name
    secondary_info: none
    card_mod:
      style: |
        ha-state-icon {
           --icon-symbol-size: 40px;
           padding-bottom: 20px;
           height: 20px;
        }    
        ha-card {
          border-radius: var(--ha-card-border-radius) !important;
          --ha-card-background: rgb(36,37,42,0.9);
          --card-mod-icon-color: white;
          --card-primary-color: white;
          --card-secondary-color: white;
          --primary-text-color: white;
          --font-weight: bold;
          --secondary-text-color: rgb(72,72,74);
        } 
  - type: custom:card-templater
    card:
      type: custom:google-map-card
      api_key: <<api_key>>
      hours_to_show: 24
      theme_mode: Dark_Forest_Night
      aspect_ratio: "0.5"
      map_type: satellite
      zoom: 17
      cameraControl: false
      zoomControl: false
      streetViewControl: false
      fullscreenControl: true
      fullscreenControl_position: TOP_RIGHT
      mapTypeControl: true
      mapTypeControl_position: TOP_LEFT
      rotateControl: false
      show_traffic_button: false
      show_weather_button: false
      show_recenter_button: false
      show_datepicker_button: false
      buttons_opacity: 1
      showScale: false
      keyboardShortcuts: false
      gesture_handling: greedy
      marker_clustering: false
      proximity_clustering: false
      proximity_radius: 150
      spiderfy: false
      show_traffic: true
      weather_layer: none
      entities_template: |
        {% if states('input_select.track_device') == 'Andrew Vint' %}
          [person.andrew_vint]
        {% elif states('input_select.track_device') == 'username2' %}
          [person.username2]     
        {% elif states('input_select.track_device') == 'username3t' %}
          [person.username3]    
        {% elif states('input_select.track_device') == 'username4' %}
          [person.username4]       
        {% else %}
          - person.andrew_vint
        {% endif %}
      card_mod:
        style: |
          ha-state-icon {
             --icon-symbol-size: 50px;
             padding-bottom: 20px;
             height: 20px;
          }    
          ha-card {
            border-radius: var(--ha-card-border-radius) !important;
            height: 750px !important;
            --ha-card-background: rgb(64,64,64,0.7);
            --card-mod-icon-color: white;
            --card-primary-color: white;
            --card-secondary-color: white;
            --primary-text-color: white;
            --font-weight: bold;
            --secondary-text-color: rgb(72,72,74);
          } 
    entities:
      - input_select.track_device
card_mod:
  style: |
    ha-card {
      border-radius: var(--ha-card-border-radius) !important;
      height: 750px !important;
      --ha-card-background: rgb(36,37,42,0.9);
      --card-mod-icon-color: white;
      --card-primary-color: white;
      --card-secondary-color: white;
      --primary-text-color: white;
      --font-weight: bold;
      --secondary-text-color: rgb(72,72,74);
    }

Thanks in advance for any help given.

Andrew

Fantastic add-on! I’ve been using it for a few months, and it has been working flawlessly.

However, over the past few days, it only seems to function when I’m at home, it no longer works when I’m away.
I’m not sure whether this is due to a bug in the add-on or a configuration issue on my end. @cataseven Could you please take a look whenever you find some time?

can this card be used without integrating it to the cloud for traffic stats and that stuff?

I added the integration in HACS but wont get the option to add the card ā€œgoogle mapsā€ in lovelace for some reason. have restarted but no luck.

Hi Andrew

Please open issue for your question here GitHub - cataseven/Google-Map-Card: Google Maps Card for Home Assistant

I am not using here frequently.

Hi Mattie

Please open issue for your question here GitHub - cataseven/Google-Map-Card: Google Maps Card for Home Assistant

I am not using here frequently.

I think we talked this on github right? It was about your API settings as far as I remember. But if I am wrong please open issue for your question here GitHub - cataseven/Google-Map-Card: Google Maps Card for Home Assistant

I am not using here frequently.

1 Like

Yes, we did! I just forgot to update this thread. Thanks for checking in.

The issue was on my side:
I still had the old external URL for my HA server saved in my Google API credentials. I’ve updated it now, and everything is working again.

Thank you very much for your help!

1 Like

Hican someone help why am I seeing this?

Please check API settings. I also respond your issue on Github

I am looking for expanding 3rd party integration support such like open weather and flightradar24. You can give your suggestions here.

New update available

Is there a chance to have Google Transit (GTFS Realtime)? I see you have Routes and Directions API already.

I will look this! Thanks for the idea

It would help to understand what you’re looking for exactly, since ā€œGoogle Transit / GTFS Realtimeā€ could mean a few different things:

  1. Static transit route overlay showing bus, tram and metro lines and stop icons on the map (Google Maps has a built-in TransitLayer for this)
  2. Live vehicle positions where you see buses and trains moving on the map in real time (this requires a GTFS Realtime feed, which is specific to each city or transit agency)
  3. Departure times like ā€œnext bus in 3 minā€ shown on the map or in a panel

Just so you know, transit routing is already supported. If you open the Travel Panel and switch to transit mode, it calculates public transport routes via the Directions API. So if that’s what you’re after, it’s already there!

For anything beyond that (live vehicle tracking, departure boards, etc.), this card only displays entities that already exist in Home Assistant. It doesn’t talk to external APIs directly. So there would need to be a HA integration that pulls GTFS Realtime data and exposes it as entities with latitude/longitude attributes.

Are you aware of any HACS integration that does this for your transit agency? I know there’s a basic gtfs / gtfs_rt integration in HA, but as far as I can tell it only provides departure sensors, not live vehicle positions on a map. If you’ve come across something that does, I’d love to take a look. It would help figure out what’s realistic on the card side.

Ah, didn’t know that’s already supported. This is mostly what I am aiming at. Right now I am using public transport departures with card but having the bus status on a map display all the time is more elegant. As of now long press will bring up the map on that integration.

1 Like

Actually something like this with your google map card.

1 Like

New update is available

New Update

HUGE! UPDATE