HERE Travel Time
The here_travel_time
sensor provides travel time from the HERE Routing API
Setup
You need to register for an API key by following the instructions in the API Developer Guide
HERE offers a Limited Plan which includes 1000 free transactions per day. If you are not updating sensors on demand, you can track 3 routes without exceeding the limit. You can provide payment details to increase this to 5000 free transactions per day. More information can be found on the pricing page
Configuration
To add the HERE Travel Time integration to your Home Assistant instance, use this My button:
Manual configuration steps
If the above My button doesn’t work, you can also perform the following steps manually:
-
Browse to your Home Assistant instance.
-
In the bottom right corner, select the
Add Integration button. -
From the list, select HERE Travel Time.
-
Follow the instructions on screen to complete the setup.
Notes:
- Origin and Destination can be the address or the GPS coordinates of the location. For a dynamic configuration you can also enter an entity id which provides this information in its state, an entity id with latitude and longitude attributes, or zone friendly name (case sensitive).
Options
Options for HERE Travel Time can be set via the user interface, by taking the following steps:
- Browse to your Home Assistant instance.
- Go to Settings > Devices & Services.
- If multiple instances of HERE Travel Time are configured, choose the instance you want to configure.
- Select the integration, then select Configure.
Dynamic configuration
Tracking can be set up to track entities of type device_tracker
, zone
, sensor
, input_select
, input_text
and person
. If an entity is placed in the origin or destination then each time the platform updates, it will use the latest location of that entity. This means it will directly use its location if possible or try to resolve entity values until it finds a valid set of coordinates. You can put several destinations as options of an input_select
and define that as the destination.
# Example entry for configuration.yaml
input_select:
here_destination_preset:
options:
- zone.home
- zone.office
- zone.somewheredefault
-
device_tracker
- If the state is a zone, then the zone location will be used
- If the state is not a zone, it will look for the longitude and latitude attributes
-
person
- If the state is a zone, then the zone location will be used
- If the state is not a zone, it will look for the longitude and latitude attributes
-
zone
- Uses the longitude and latitude attributes
-
sensor
- If the state is a zone, then will use the zone location
- If the state is a name of another entity it will recursively resolve entity states until if finds a valid set of coordinates
-
input_select
- If the state is a zone, then will use the zone location
- If the state is a name of another entity it will recursively resolve entity states until if finds a valid set of coordinates
-
input_text
- If the state is a zone, then will use the zone location
- If the state is a name of another entity it will recursively resolve entity states until if finds a valid set of coordinates
Updating sensors on-demand using Automation
You can also use the homeassistant.update_entity
action to update the sensor on-demand. For example, if you want to update sensor.morning_commute
every 2 minutes on weekday mornings, you can use the following automation:
automation:
- alias: "Commute - Update morning commute sensor"
initial_state: "on"
triggers:
- trigger: time_pattern
minutes: "/2"
conditions:
- condition: time
after: "08:00:00"
before: "11:00:00"
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
actions:
- action: homeassistant.update_entity
target:
entity_id: sensor.morning_commute