I’ve noticed ever since I updated to 0.72 Waze has stopped working. This is the error in the logs. Anyone else having issues?
2018-06-29 14:38:17 ERROR (MainThread) [homeassistant.components.sensor] waze_travel_time: Error on device update!
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/components/sensor/waze_travel_time.py", line 110, in update
self.waze_data.update()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/components/sensor/waze_travel_time.py", line 136, in update
File "/Users/mediacenter/.homeassistant/deps/lib/python/site-packages/WazeRouteCalculator/WazeRouteCalculator.py", line 142, in calc_all_routes_info
File "/Users/mediacenter/.homeassistant/deps/lib/python/site-packages/WazeRouteCalculator/WazeRouteCalculator.py", line 92, in get_route
So there is an issue with the header coming back from the resource module WazeRouteCalculator. It seems like waze changed the JSON data coming back from the url requests. It is just ‘dumb luck’ that this occured around the same time that home assistant updated to 0.72. All versions will be broken, so don’t bother down grading.
There is currently a change request to the resource module WazeRouteCalculator and the guy who made it found a fix. It’s only a matter of time before it gets implemented in HA. I wouldn’t expect it until 0.74 at the earliest due to the current release cycles.
EDIT: If anyone is interested in the github for WazeRouteCalculator:
I have it working on 0.77.2 but I have 6 different Waze trips to check and the problem is that I can’t get the right time to match with the right trip on the display. They are the correct 6, but not much good if I can’t assure they align with a proper friendly name. The name: field in the component does not seem to work.
Im running version 0.77.2 and the issue im having is that the sensor doesnt show the travel time. when i click on it says “unknown” it could very well be a config issue since im new to this but going by the docs it looks ok. let me know if you want to see the config/screenshot
@petro Took me a while, but I’m setting up LoveLace and still having a problem getting a friendly name with my sensors. I have 6 of them setup in sensors.yaml. The name: causes a problem if I use it, so I have to comment it out. I’ve put one of the 6 below.
platform: waze_travel_time
name: Home to SAA
origin:
destination:
region: ‘NA’
They are then coming as sensors
- sensor.waze_travel_time
- sensor.waze_travel_time_2
- sensor.waze_travel_time_3
- sensor.waze_travel_time_4
- sensor.waze_travel_time_5
- sensor.waze_travel_time_6
So knowing which is which is difficult and they seem to shift order making it tough to get the correct name. I had to use customization.yaml and put a friendly_name, but it doesn’t align.
i.e. sensor.waze_travel_time_4:
friendly_name: Home to SAA
Maybe I am not getting my syntax right, but having same issue with LoveLace.
@petro I have them configured in the sensors.yaml, but I had to associate a friendly_name via the customize.yaml or else they all had the same name. Problem is that I can’t align them other than trying to guess the time, but it seems every load they go in a different order via the entity id since they are _2 - _6 as you can see. Help as maybe I’m just doing something wrong.
I think that I’ve figured out how to do it in LoveLace
- entity: sensor.waze_travel_time_6
name: This is a test
Going to name them all this way and see if it works as an override in lovelace
Still doesn’t guaratee that I name the right entity, but I see that when I open the route is shown, but then I have to work that out to be which origin to destination… bit of sleuthing required to match.
Whenever I put anything for the name: string it fails to load.
platform: waze_travel_time
name: This is custom 12345
origin:
destination:
region: ‘NA’
I’ve never seen it rename the entity and all mine stay default renumbered. It must be in the step where it tries to create or rename the entity. Could it be since mine are region: ‘NA’
I will try again with a single as it’s still not working for me as the names associated to the wrong entity from restart to restart.
Tried as above and wound up with 1 of the 6 getting the above error.
related log in error log
Traceback (most recent call last):
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/sensor/waze_travel_time.py”, line 74, in
EVENT_HOMEASSISTANT_START, lambda _: sensor.update())
File “/usr/src/app/homeassistant/components/sensor/waze_travel_time.py”, line 204, in update
routes = params.calc_all_routes_info(real_time=self._realtime)
File “/usr/local/lib/python3.6/site-packages/WazeRouteCalculator/WazeRouteCalculator.py”, line 145, in calc_all_routes_info
routes = self.get_route(npaths, time_delta)