Get travel times
The Get travel times action retrieves route alternatives and travel times between two locations.
This is useful when you want an automation or script to look up live travel times on demand, for example to decide when to leave or to find the exact street names along a route.
This action does not support targets. In the UI, you are not prompted to choose an area, device, entity, or label. Instead, you provide the origin, destination, and route preferences.
Using this action from the user interface
If you prefer building automations and scripts visually, Home Assistant walks you through this action step by step. You pick what to target, tweak a few options, and save. No YAML knowledge required.
To get travel times from an automation or a script:
- Go to Settings > Automations & scenes.
- Open an existing automation or script, or select Create automation > Create new automation.
- If you’re setting up a new automation, add a trigger in the When section. Scripts don’t need a trigger. They run when something else calls them.
- In the Then do section, select Add action.
- From the search box, search for and select Waze Travel Time: Get travel times.
- Enter the Origin, Destination, and Region, then optionally set the other options.
- Select Save.
Options in the UI
The origin of the route. Accepts coordinates, an address, or an entity such as a person or zone.
The destination of the route. Accepts coordinates, an address, or an entity such as a person or zone.
The region, which controls which Waze server is used. One of US, North America, Europe, Israel, or Australia.
Avoid roads that need a vignette or subscription. Defaults to off.
One or more exact street names that must be part of the selected route. The match is case-sensitive and must include spaces and special characters.
One or more exact street names that must not be part of the selected route. The match is case-sensitive and must include spaces and special characters.
A time offset from now to calculate the route for. Positive values are in the future, negative values are in the past.
Using this action in YAML
If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.
In YAML, refer to this action as waze_travel_time.get_travel_times. Because this action returns data, use response_variable to capture the result. A basic example looks like this:
action: waze_travel_time.get_travel_times
data:
origin: "51.330436, 3.802043"
destination: "51.445677, 3.749929"
region: eu
response_variable: routes
This looks up the routes and stores the result in the routes variable.
Options in YAML
The origin of the route. Accepts coordinates, an address, or an entity such as a person or zone.
The destination of the route. Accepts coordinates, an address, or an entity such as a person or zone.
The region, which controls which Waze server is used. One of us (United States), na (North America), eu (Europe), il (Israel), or au (Australia).
One or more exact street names that must be part of the selected route. The match is case-sensitive and must include spaces and special characters.
One or more exact street names that must not be part of the selected route. The match is case-sensitive and must include spaces and special characters.
A time offset from now to calculate the route for. Positive values are in the future, negative values are in the past.
Response data
The action returns a routes list. Each route includes:
-
name: a short description of the route, usually a main road along the way. -
distance: the distance of the route, in the selected unit system. -
duration: the travel time of the route, in minutes. -
street_names: the list of street names along the route.
For the example above, the response looks similar to this:
routes:
- duration: 16.15
distance: 13.942
name: B455 - Boelckestraße Wiesbaden
street_names:
- Eleonorenstraße
- Wiesbadener Straße
- Otto-Suhr-Ring
- Boelckestraße
- duration: 16.9
distance: 15.319
name: L3482 - Wiesbadener Landstraße Wiesbaden
street_names:
- Eleonorenstraße
- Wiesbadener Landstraße
- Kasteler Straße
Try it yourself
Ready to test this? Open Developer tools > Actions, search for this action, fill in the fields, and select Perform action. You see what happens on your actual entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] without writing a line of YAML.
Still stuck?
The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the action you’re calling and what you expected to happen, or share on our subreddit /r/homeassistant.
AI assistants like ChatGPT or Claude can also explain actions or suggest the right one when you describe what you want in plain language.