Waze time not working

I like to have some travel times included in my installation. Tried Here first, but my logging states the login is not correct. Cannot find the reason, so tried Waze. I cannot get it to work, the traveltime keeps being unknown. Tried GPS coordinates, zones, person entity etc. It keeps state unknown. Any idea what I’m doing wrong?

Config (sensor):

 - platform: waze_travel_time
    name: "Travel to Unica Deventer"
    origin: zone.home
    destination: "zutphenseweg 31 Deventer, Netherlands"
    region: 'EU'

First, your sensor configuration is improperly indented. It should be:

  - platform: waze_travel_time
    name: "Travel to Unica Deventer"
    origin: zone.home
    destination: "zutphenseweg 31 Deventer, Netherlands"
    region: 'EU'

But I’m guessing that was just a copy & paste error when you posted your config. If that was indeed the case please be more careful in the future when posting. YAML is very sensitive to indentation, and a missing space can prevent something from working.

Again, assuming that was not the problem, I think you might be experiencing a bug in the code. At least it looks like a bug to me. Could you try changing:

    origin: zone.home

to:

    origin: Home

That’s assuming the friendly_name of zone.home is “Home.” If it’s something else in your configuration, then set the origin option to the friendly_name of zone.home. Let me know if that makes it work. If so I’ll try fixing the bug.

BTW, you can also get more insight into what the code is doing by enabling debug for this component, like this:

logger:
  default: info
  logs:
    homeassistant.components.waze_travel_time: debug

This will cause additional debug messages in the log (i.e., home-assistant.log.)

1 Like

zone.home should work. And unless something has changed, ‘Home’ should not. I believe a dev is working on adding friendly names as an option, but it’s not in there yet.

EDIT: This is the pr https://github.com/home-assistant/home-assistant/pull/28716

Ok, I read the code more closely and the bug I thought I saw isn’t there. The bit of code I was looking at was just a little confusing.

Well I’ve been using “Home” for a while, and it works just fine. (I’m currently still on version 0.95.4, so it’s worked at least since then.)

Oh yeah, it’s not optimized at all. I believe the end goal is to have a TravelEntity base class that performs the logic in a better manor. The author of the PR above is rewriting all three travel times.

It probably changed then. I haven’t worked on that in 2 years and some other guy is taking it over (or seems to be).

The code that makes “Home” work was there in your PR 2 years ago. :slightly_smiling_face:

Haha, that’s great. Whelp, good ole memory.

1 Like

@HScholing, you may need to do this to see what’s going on and why your sensors are not updating, or are updating to ‘unknown’.

Thanks, this was a copy paste error on the post, sorry for that.

I will try the debug first to see what is happening

I am still working on the specifics of a TravelEntity base class.

@pnbruckner HERE travel time currently fails for new users such as yourself. The fix is already merged and will be part of the next release:
https://github.com/home-assistant/home-assistant/pull/29966

I’m not using HERE. The OP (@HScholing) I believe tried it and couldn’t get it working.

Cannot explain what happened, but I added an additional zone in my config with the name Home. After restarting the travel time shows. Can it be that, when only setting my home information under general settings and not in de configuration.yaml the zone home is not set automaticly?

@eifinger It was me indeed trying the Here integration. When will the new release be available? Is this the release of today or a new general release of Home Assistant?

It will be in the upcoming release next year

1 Like

zone.home is supposed to be created automatically. Did you look on the STATES page to see if it existed (before you manually created it in the YAML file)?

sorry, I did not