Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking route makes waze page crash #11

Open
WesSec opened this issue Jun 22, 2020 · 1 comment
Open

Clicking route makes waze page crash #11

WesSec opened this issue Jun 22, 2020 · 1 comment

Comments

@WesSec
Copy link

WesSec commented Jun 22, 2020

Hi,

I just installed your card, and when I click a route to open it in Waze maps (Firefox 77, Win10) the website crashes. It looks like it tries to refresh the page a gazillion times. I cannot find any logs which are related, i hope you can reproduce it. I see the &time=now flickering in the URL bar when the page tries to load, this might be related.

My card config:

columns:
  - from
  - to
  - duration
  - distance
destinations:
  - entity: sensor.home_to_work
    from: Home
    to: Work
name: Travel Time
type: 'custom:ha-card-waze-travel-time'
unit: km

My sensor:

- platform: waze_travel_time
  name: Home to Work
  origin: zone.home
  destination: zone.work
  region: 'EU'

Cheers!

@WesSec
Copy link
Author

WesSec commented Jul 6, 2020

I just did some more research and found that the URL has changed, most likely causing the issue

in the code

https://www.waze.com/ul?navigate=yes&ll=${state.destination.lat}%2C${state.destination.long}&from=${state.origin.lat}%2C${state.origin.long}&at=now

used by waze in the browser

https://www.waze.com/nl/livemap/directions?navigate=yes&to=ll.<dest.lat>%2C<dest.lon>&from=ll.<src.lat>%2C<src.lon>&time=now

I do not have a testing environment so I'm unable to test it and create a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant