Travel Time Card

Show travel time data and open rotues to Google Maps or Waze

Installation through HACS


Add the following to resources in your lovelace config:

resources:
  - url: /community_plugin/travel-time-card/travel-time-card.js
  - type: js

Configurations:


type: 'custom:travel-time-card'
entities:
  - entity: sensor.google_leo_home
  - entity: sensor.google_leo_work
  - entity: sensor.waze_leo_work
    zone: zone.leo_work
  - entity: sensor.waze_leo_home

Note: some travel time sensors such as Waze do not come with the destination address with it so you’ll need to specify it manually via the zone setting for an entity. You can also set a custom zone for any entity to override the destination address.

Options


Name Type Requirement Default Description
entites list Required List of entities to show (see entity config below)
title string Optional Github Change card title
show_header boolean Optional true Show or hide header
columns list Optional ['name', 'duration', 'distance', 'route'] Customize what columns are shown
map string Optional google Open to google or waze maps when a route is clicked (google or waze only)
Name Type Requirement Default Description
entity string Required The travel time entity id
zone string Optional Override the destination route with a zone or add one if none is given from entitiy
2 Likes

I had to add the new card to HACS after first manually adding it as a custom repository.

Exchanging the Waze Card with this one was easy.

Thank you for the update :+1:

Btw there is a typo in the Readme entites instead of entities

I don’t know if I’m doing anything worng. I installed from HACS and when clicking on one destination in my mobile, when “map: google”, it will open Google Maps with the chosen destination. When “map: waze” it only opens waze, but without any destination selected.

Anything I could check?

Thanks for the Card. It works fine (apart from this little thing).

Unfortunately, the Waze sensor doesn’t give the destination like the Google sensor does. I added coded for Waze to give me that info too but it won’t be out until next release. You can use the zone property to set a destination zone.

I’m not sure I understand. In ui-lovelace.yaml file I have the following:

      - type: 'custom:travel-time-card'
        map: waze
        entities:
          - entity: sensor.work1_travel_time
            zone: zone.work1
          - entity: sensor.work2_travel_time
            zone: zone.work2

When “map: google”, Google Maps open with destination set as the chosen zone. When “map: waze” Waze just opens, with no destination set.

I mean, the zones have been set, isn’t it? Or you are talking about “other zones” or another place to define them?

Sorry for not having this clear, maybe it’s in some place I cannot find (and I read the Waze Travel Card thread…).

Regards.

Edit: These are the sensors:

- platform: waze_travel_time
  name: "work1_travel_time"
  origin: xx.xxxxxx, -y.yyyyyy
  destination: zz.zzzzzz, -a.aaaaaa
  region: 'EU'
- platform: waze_travel_time
  name: "work2_travel_time"
  origin: xx.xxxxxx, -y.yyyyyy
  destination: bb.bbbbbb, -c.cccccc
  region: 'EU'

And the zones:

zone:
  - name: Home
    latitude: xx.xxxxxx
    longitude: -y.yyyyyy
    radius: 100
    icon: mdi:home
  - name: Work1
    latitude: zz.zzzzzz
    longitude: -a.aaaaaa
    radius: 250
    icon: mdi:factory
  - name: Work2
    latitude: bb.bbbbbb
    longitude: -c.cccccc
    radius: 100
    icon: mdi:factory

Is it possible to somehow make an actuall button in the card for refreshing the times ?

For example when I have three sensors and I want to update them every 20 minutes so I do not have to pay for the requests but as I leave home I want to check the traffic so I click a REFRESH button to get the latest update ?

Thanks