Waze Travel Time Inaccurate

Hello, I use the Waze Travel Time integration, but it adds on a few minutes to what the time should be.

In my configuration.yaml I have:

  - platform: waze_travel_time
    origin: (lat),(long)
    destination: (lat),(long)
    region: 'NA'
    name: (name)

And when I look at the state for the sensor.(name) it returns 21 minutes. However, using the actual Waze maps site on my computer and the same origin/destination, it shows that same drive is 18 minutes.

What’s with the 3 minute error?

1 Like

Perhaps they are using different routes?

I thought about that, too, but shouldn’t it default to the shortest route? I can try a test case on a straight highway.

I think you’re right, it’s using an alternate route. I created this test sensor (entirely different location) for a straight section of highway. The Waze maps had 2 route options: 1) direct staying on highway the entire time for a trip of 31 min. Or 2) Had an alternate route that takes you off the highway for a trip of 44 min.

Configuration.yaml code:

  - platform: waze_travel_time
    origin: 41.69477011,-91.69255972
    destination: 41.6962762,-92.43649721
    region: 'NA'
    name: Wazetest

The sensor state returns back 43.18333 min, so it’s obviously using the longer path.

The question now, is why does it do this?

Not sure if it was Google or Waze that said the routes they were going to offer was supposed to be the route with less CO2 emissions.

I don’t think you can change it. I know the API gives options, so if you got the data from the API directly then you can do it yourself.

Yes, but if that were the case, I would think the more direct/shorter route of 31 min would be the route with less CO2 emissions.

I’m not sure how to access the API to see the options?

The option “Avoid difficult intersections” on my Waze phone app was on for some reason and I turned it off. The sensor updated, but still shows the longer time of 43.2666 minutes. I don’t see any other weird options turned on.

Avoid tolls roads - off
Avoid ferries - off
Avoid freeways - off
Unpaved roads - don’t allow

In the example above with the straight route on I-80, I even tried an exclusion filter in the YAML to not use the US-6 longer/alternate route:

  - platform: waze_travel_time
    origin: 41.69477011,-91.69255972
    destination: 41.6962762,-92.43649721
    region: 'NA'
    excl_filter: 'US-6'
    name: Wazetest

Still doesn’t work and returns back the longer 44 minute route. I am so confused right now.

I have migrated over to the HERE travel time sensor and so far it works well.

FYI you had the lat and lon reversed, this is why It didn’t work. If you copy the coordinates from waze, they are backwards. So you can switch back to waze if you want but reverse the lat/lon

I tried flipping the lat/longs and let it run for 20 min to have a few updates to the sensor.

  - platform: waze_travel_time
    origin: -91.69255972,41.69477011
    destination: -92.43649721,41.6962762
    region: 'NA'
    excl_filter: 'US-6'
    name: Wazetest

Same results where I get the longer path of 43 min instead of the expected 31 min.

More expanding information. I have been using Waze Travel Time for many months now with no issues. Then, for some reason, one day it decided to give me an increased travel time of an alternate route.

Edit: After I flipped the lat/longs, it just retained the last known value of the sensor, which was 43 min. I created a new sensor to test the new lat/longs (flipped) and it never calculated a time. It remained as “unknown” which leads me to believe that my lat/longs were correct originally.

I am having exactly the same issue: Waze Travel Time giving a reliable estimate for quite some time, matching what I see in the mobile app. One day it changed and is now over-estimating the travel time…

I am experiencing similar issues - More surprisingly the route is no longer captured as a attribute

Same for me. It worked perfect. I had two routes, one with paytoll and another one without paytoll. Travel time has increased a lot without doing anything. Quite fustrating because I calculate the same route with the Waze live map and it gives the correct results for both routes.

I just updated to 2022.2 and without changing anything, the Waze sensors are back to their normal function and giving me the correct times now! Anyone else successful?

I’m having a similar issue…i have sensors set up for my wife and i, and they were always around 20-something minutes. Not quite accurate for both of us but close enough.

Now for the past few weeks, hers says nearly 900 minutes, and mine is only 6-7min. the attributes showing routes (interstate highways) that are nowhere near us. I can’t even create a new sensor.

You need to remove the integration then add it again

Deleted them and still can’t create a new one

2022-02-07 21:21:34 ERROR (SyncWorker_52) [homeassistant.helpers.location] Unable to find entity Home
2022-02-07 21:21:34 ERROR (SyncWorker_52) [homeassistant.helpers.location] Unable to find entity <REDACTEDWORKZONENAME>
2022-02-07 21:21:34 INFO (SyncWorker_52) [WazeRouteCalculator.WazeRouteCalculator] From: None - to: None
2022-02-07 21:21:34 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 98, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 219, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 164, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 111, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/waze_travel_time/config_flow.py", line 108, in async_step_user
    if await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/waze_travel_time/helpers.py", line 12, in is_valid_config_entry
    WazeRouteCalculator(origin, destination, region).calc_all_routes_info()
  File "/usr/local/lib/python3.9/site-packages/WazeRouteCalculator/WazeRouteCalculator.py", line 65, in __init__
    if self.already_coords(start_address):  # See if we have coordinates or address to resolve
  File "/usr/local/lib/python3.9/site-packages/WazeRouteCalculator/WazeRouteCalculator.py", line 79, in already_coords
    m = re.search(self.COORD_MATCH, address)
  File "/usr/local/lib/python3.9/re.py", line 201, in search
    return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object

Here was my situation, maybe it will help. I kept my Waze sensors as is when they started reporting the wrong times and just added on HERE sensors. Upon upgrading to 2022.2, the Waze sensors were correctly reporting again. But I also wanted to add new Waze sensors. The breaking changes of 2022.2 said that everything is now done via the UI vs YAML. I tried adding in the GPS coordinates, but can’t get them to work/accept it. So what I did as a rough hack/fix… I rolled back to a 2021.12 backup I had, added in the new Waze sensors, and then upgraded to 2022.2. I’m sure someone else has a better way, but that’s what worked for me.