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

Wrong city ID - problem with proper bike count #6

Closed
paszczaq opened this issue Mar 8, 2023 · 3 comments
Closed

Wrong city ID - problem with proper bike count #6

paszczaq opened this issue Mar 8, 2023 · 3 comments

Comments

@paszczaq
Copy link

paszczaq commented Mar 8, 2023

Hi,
It seems that City ID have changed for Warszawa (in docs its showing

VETURILO Poland
690 Warszawa-testy (52.2362, 21.0107)

but after putting proper config in my sensor.yaml

- platform: nextbike
  name: Warszawa
  city_id: 690
  latitude: 52.229435
  longitude: 21.094524
  radius: 1000

It throws error

`2023-03-08 08:56:24.317 ERROR (MainThread) [custom_components.nextbike.sensor] Could not connect to Nextbike API endpoint: 0, message='Attempt to decode JSON with unexpected mimetype: text/html', url=URL('https://maps.nextbike.net/maps/nextbike-live.json?&city=690')
2023-03-08 09:01:24.277 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):`

I've check https://maps.nextbike.net/maps/nextbike-live.json and it seems that Warszawa ID is 812, but when I use it it show 0 bikes in Home Assistant

syssi added a commit that referenced this issue Mar 8, 2023
@syssi
Copy link
Owner

syssi commented Mar 8, 2023

I cannot reproduce the issue. If I add this sensor to my Home Assistant setup:

sensor:
  - platform: nextbike
    name: Warszawa
    city_id: 812
    latitude: 52.229435
    longitude: 21.094524
    radius: 1000

It looks like there a 5 bikes available in a radius of 1km at the moment:

nextbike-warszawa

@syssi
Copy link
Owner

syssi commented Mar 8, 2023

I've updated the list of city ids to avoid confusion in future! Thanks for your feedback!

@paszczaq
Copy link
Author

paszczaq commented Mar 8, 2023

@syssi - thanks! Ok, I just checked without latitude / longitude and it worked just fine :)

- platform: nextbike
  name: Veturilo
  city_id: 812
#   latitude: 52.229435
#   longitude: 21.094524
  radius: 1000

image

We can close this issue!

@syssi syssi closed this as completed Mar 8, 2023
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

2 participants