Custom Component: here_travel_time

questions after update:
what does this attribute mean? attribution: null
The state now shows the duration or duration_in_traffic? expected in relation to the mode, right?

Attribution holds a string which the vendor of the api requires you to display. For example Waze requires you to display “Powered by Waze”. For HERE this is empty as it is not required.

  1. duration always shows the duration without traffic
  2. duration_in_traffic shows the duration in traffic if traffic_mode: True is used and mode is car or truck
  3. Otherwise duration_in_traffic shows the same as duration (duration without traffic)
  4. state shows the same as duration for traffic_mode: False
  5. state shows the same as duration_in_traffic for traffic_mode: True

EDIT: So basically, yes you are right!

1 Like


as my car sensors work perfectly, I played around with the publicTransportTimeTable a little.
I always use the train when travelling to my office.
But, I got as result the minutes I need and the Line Number (Route)
No information about next starttime or arrivaltime or delays.
What is the use case for this?

@scstraus seems to have a use case for this.

I could add an additional attribute departure or public_departure which shows the departure time of the first(?) line. Arrival time would then be departure time + duration

There is also a transit api:

I could implement another component which behaves much like @cgtobi 's rmvtransport sensor

1 Like

That would be really great.
My use case: Between 06 and 10 alexa tells me. when the next departure from my station to cologne is more then 5 Minutes late. Then I have to fall in panic because my connecting train in cologne might be unarrivable :slight_smile:
there is a DB Sensor which provides the information

But this one is very slow and not very flexible. It causes warnings in HA Log because in needs more then 10 sec.

UPDATE: I restarted the container (not just HA) and it is now working. Not sure why that made a difference, but I actually had to go to Portainer and restart the HA container and now the sensor is working as expected.

If anyone is having issues similar to below, try restarting the container - not just HA.

Updating configuration for the 2.0.0 update… the origin_entity_id does not seem to be working.

Log Details (ERROR)

Fri Aug 16 2019 13:05:34 GMT-0400 (Eastern Daylight Time)

Invalid config for [sensor.here_travel_time]: [origin_entity_id] is an invalid option for [sensor.here_travel_time]. Check: sensor.here_travel_time->origin_entity_id. (See ?, line ?). Please check the docs at 
Invalid config for [sensor.here_travel_time]: [origin_entity_id] is an invalid option for [sensor.here_travel_time]. Check: sensor.here_travel_time->origin_entity_id. (See ?, line ?). Please check the docs at

My configuration.yaml entry:

- platform: here_travel_time                                                         
    name: Work Short Route                                                             
    traffic_mode: true                                                                 
    route_mode: shortest                                                               
    app_id: !secret here_api_id                                                        
    app_code: !secret here_api_code                                                    
    origin_entity_id: zone.home                                                        

Not sure what I’ve got wrong… seems like it should be a simply change…


1 Like

Just wondering - would it be possible to have something similar to incl_filter variable from Waze travel time which forces to calculate selected route through given street?

I realize that its a lot of work but that would be awesome. Universal component for public transport which works with all major cities around the wold would really benefit HA.

The HERE API does not support this directly but maybe there is a workaround.
Could you please open an issue for your feature request under ? thank you!

Totally agree. a big value add even we’re talking about an official integrated component later.

For me, I use it to tell which tram/train/bus will be the fastest at that moment, and also to detect outages. I don’t really need to know departure time, I just look at it when leaving the house and go to the one it says is the fastest.

Though departure time would be a nice addition for some people… I don’t need it for my use case though. As long as it’s giving me the fastest route, I know it’s giving me the walking time needed to get there.

@eifinger, i’m on beta 0.100.0b0 and all i had to do was to remove the integration from hacs.
Thanks for putting this to HA core.

Thank you for the kind feedback!

how do you do that … (sorry to be off topic, I’ve enabled the beta in system settings, but dont see an update signal ?)

I’ve seen it in the discord beta channel.

I can’t get this custom component to work. Tried to manually install the component and also using HACS. I’m running, config check results in the following error:

Platform error sensor.here_travel_time - No module named 'herepy'

Re-starting is not possible…

On what version are you on? “Older” versions of have this problem.

Can you try to update manually e.g. via the command line?

Have you tried installing the module manually in your enviroment?

pip3 install herepy

I’m on the latest version.
I don’t think it’s possible to manually update via the command line on, or is it?

I made it to work… Had to re-start without adding the sensor, and added the sensor after that. :smiley:

Glad you could make it work!

Once 0.100 gets released this will be easier :sweat_smile: