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:

  1. Go to Settings > Automations & scenes.
  2. Open an existing automation or script, or select Create automation > Create new automation.
  3. 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.
  4. In the Then do section, select Add action.
  5. From the search box, search for and select Waze Travel Time: Get travel times.
  6. Enter the Origin, Destination, and Region, then optionally set the other options.
  7. Select Save.

Options in the UI

Origin (Required)

The origin of the route. Accepts coordinates, an address, or an entity such as a person or zone.

Destination (Required)

The destination of the route. Accepts coordinates, an address, or an entity such as a person or zone.

Region (Required)

The region, which controls which Waze server is used. One of US, North America, Europe, Israel, or Australia.

Realtime travel time? (Optional)

Use real-time data instead of statistical data. Defaults to off.

Vehicle type (Optional)

The vehicle to use. One of car, taxi, or motorcycle. Defaults to car.

Units (Optional)

The unit system to use. Either metric or imperial. Defaults to metric.

Avoid toll roads? (Optional)

Avoid toll roads. Defaults to off.

Avoid roads needing a vignette / subscription? (Optional)

Avoid roads that need a vignette or subscription. Defaults to off.

Avoid ferries? (Optional)

Avoid ferries. Defaults to off.

Streets to include (Optional)

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.

Streets to exclude (Optional)

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.

Time delta (Optional)

A time offset from now to calculate the route for. Positive values are in the future, negative values are in the past.

Base coordinates (Optional)

When Waze finds multiple matching locations for an address, it selects the one closest to these coordinates.

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:

ActionActions are used in several places in Home Assistant. As part of a script or automation, actions define what is going to happen once a trigger is activated. In scripts, an action is called *sequence*. [Learn more]
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

origin string Required

The origin of the route. Accepts coordinates, an address, or an entity such as a person or zone.

destination string Required

The destination of the route. Accepts coordinates, an address, or an entity such as a person or zone.

region string Required

The region, which controls which Waze server is used. One of us (United States), na (North America), eu (Europe), il (Israel), or au (Australia).

realtime boolean

Use real-time data instead of statistical data.

vehicle_type string

The vehicle to use. One of car, taxi, or motorcycle.

units string

The unit system to use. Either metric or imperial.

avoid_toll_roads boolean

Avoid toll roads.

avoid_subscription_roads boolean

Avoid roads that need a vignette or subscription.

avoid_ferries boolean

Avoid ferries.

incl_filter list

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.

excl_filter list

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.

time_delta map

A time offset from now to calculate the route for. Positive values are in the future, negative values are in the past.

base_coordinates map

Coordinates (latitude and longitude) used when Waze finds multiple matching locations for an address. For example: latitude: 52.5200 and longitude: 13.4050.

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:

Result
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.

Tip

AI assistants like ChatGPT or Claude can also explain actions or suggest the right one when you describe what you want in plain language.