So I initially took a look at this because I noticed it was still asking me for username/password when setting up the integration, which aren't needed here obviously. Then I noticed the sensor couldn't update anymore for some reason, and it turns out theres a newer (non-deprecated) version of this API available.
So the changes I made here include:
Removing lots of left over unnecessary stuff from the template you used, including:
Mentions of jsonplaceholder.typicode.com dummy JSON endpoint
Unnecessary username/password config flow
Fixed a few different references to different versions of this repository so they all point to ryanbateman/bvg-sensor now
I updated the version number everywhere to match, you had 0.3.1 in HACS, but 0.0.0 and 0.0.1 elsewhere (const.py for example), which was being rendered in the UI
Updated the API endpoint to use the v6 transport.rest API, which should take the same arguments / return the same data, so no major changes needed here.
My final question to you is, are the binary_sensor and switch entites necessary? What are they used for? To me it looks like they are unused, can we remove them and simplify this? I think the bvg-sensor integration should just provide sensors for the status of public transit stops you want to follow, right?
Todo
Currently still draft as I confirm I've not broken anything :joy:
So I initially took a look at this because I noticed it was still asking me for username/password when setting up the integration, which aren't needed here obviously. Then I noticed the sensor couldn't update anymore for some reason, and it turns out theres a newer (non-deprecated) version of this API available.
So the changes I made here include:
jsonplaceholder.typicode.com
dummy JSON endpointryanbateman/bvg-sensor
now0.3.1
in HACS, but0.0.0
and0.0.1
elsewhere (const.py
for example), which was being rendered in the UIMy final question to you is, are the
binary_sensor
andswitch
entites necessary? What are they used for? To me it looks like they are unused, can we remove them and simplify this? I think the bvg-sensor integration should just provide sensors for the status of public transit stops you want to follow, right?Todo