Lovelace: Travel Time Card

Thanks for your answer. I wait longer than 5 minutes, but still 0. I reinstalled now, did restart and wait 10 minutes. Still no change… Any idea?

Is there a way to change the name when setting up the entity card? I have this but the name field didn’t change.

   - type: 'custom:travel-time-card'
     entities:
      - entity: sensor.commute_to_home
        name: Home
      - entity: sensor.commute_to_work
        name: Work

How did you do the Destination address part?

its all hardcoded in. i cant just type in an address, due to this card needing lat/long as the input but:

input_select.yaml

destination:
  name: Destination - Address
  options:
    - Tashas House
    - Home

^doesnt matter what you put here just make sure its exactly the same in the sensor:

sensor.yaml

dest_address:
  value_template: >-
    {%- if is_state("input_select.destination", "Tashas House") -%}
      latitude,-longitude # goes here
    {%- elif is_state("input_select.destination", "Home") -%}
      LAT,-LONG # lat/long again
    {%- else -%}
        Unknown Location
    {%- endif %}

- platform: waze_travel_time
  name: "Destination"
  origin: device_tracker.yourphone
  destination: sensor.dest_address
  region: 'US'
  units: imperial
  vehicle_type: car

thats pretty much it, when you select the ‘address’ you are just selecting the lat long from the sensor thats been hardcoded.

I wish i knew how to convert address to lat/long on the fly… then you could just use an input_text and it would be good.

oh and the route info card pretty self explanatory but:

entities:
  - entity: sensor.destination
type: 'custom:travel-time-card'

Hi, just small idea:
Would it be possible to make sensor hidden when it’s distance attribute is below given value (for example 1 km)?
I have 8 sensors (me - home, me work and similar ones for wife and kids) and as we spend 90% of time in one of the destinations half of the sensor in the card show zeros. Such option would allow to declutter it and make it much more readable.

Is there a way to get the actual arrival time displayed with this?
Just to be clear what I’m talking about is if it is 7:30 and the drivetime reported by waze is 30 minutes then the card would display 8:00 as the arrival time.
Thanks

I have a sensor set up like this, this gives the eta:

I use HERE to get the travel times so you may have to change whatever entity you have that shows how many minutes

{% set eta = ((state_attr('sensor.xxxxx_to_home', 'duration') *60) + as_timestamp(now())) | timestamp_custom ('%-I:%M %p') %}

Hello,
I probably have a noob question regarding this card.
As I only started to use home assistant this month, i do not understand how to implement this.
I added the resource: afbeelding

But I always get this problem:

Can someone help me with this probably easy problem?

Have you reloaded resources and refreshed lovelace ( 3 dots in right hand corner) and your browser CTRL+F5 ?

Assume you installed with HACS ?

And yes you just confirmed I am a beginner. I didn’t do it through HACS. I thought you could just add the resource and add the card subsequently. Thank you for your quick response

Just a question: so for every third party card, i have to install it through HACS? Will this add the necessary resource automatically then?

You don’t have to use HACS but it is much easier to do so.

The necessary files will be copied, yes

I’ve not used the UI to add the resources but I guess try it and see if it works.

Don’t forget to try and do the reload and refreshes once its installed

1 Like

Hi, it works great!!
would there be a way to be able to choose the means of transport, such as car, bicycle, or pedestrian??2021-05-14 15-38-44
I had started something but it didn’t give me the distance, and I couldn’t extract the given for anything other than the car … :face_with_raised_eyebrow: :expressionless:

Hi to all, please, someone may direct me.
I have 4 waze sensors already configured. They are working with the regular entities card showing the time distance. At any case, the sensors work well, they have the distance and route included as I can see them in the “developer tools”.
The problem is that I include the four of them in a custom:travel-time-card as explained in this thread, but it only shows the header “Travel Times” with the column names, but no data. No error advice.
Does anybody know what can happen?
Thanks in advance.

post your code and maybe we can help

Hello,
I have the following error:

DevTools failed to load source map: Could not load content for https://url/hacsfiles/travel-time-card/travel-time-card.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Any idea? I can’t find anything on the web.
Thanks.
Florent

type: custom:travel-time-card
entities:
  - entity: sensor.work1
  - entity: sensor.work2
  - entity: sensor.home1
  - entity: sensor.home2

I am sorry, I was misremembering what I used. this is in my config https://github.com/royto/waze-card

and it looks quite the same

  - type: entities
    title: Dynamic Waze travels
    entities:
      - input_select.waze_origin
      - input_select.waze_destination
      - sensor.origin
      - sensor.destination
      - entity: script.update_waze_dynamic
        action_name: Update
      - type: custom:waze-card
        card_mod:
          style: |
            ha-card {
              box-shadow: none;
              margin: 0px -16px 0px -16px;
            }
        title: Travel time
        entities:
          - entity: sensor.route_planner

is it possible to get the walking time between two entities using some integration?

You can use the Here integration, select ‘pedestrian’