-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Add CityBus integration #129231
base: dev
Are you sure you want to change the base?
Add CityBus integration #129231
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ericswpark
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
6b495af
to
8518f10
Compare
CityBus switches around the keys periodically, breaking the integration. Store the name of the route and direction destination, and perform key lookup on fetching sensor data.
Okay 4 things:
|
It's not a copy-paste. The way we retrieve and display bus information for a given route on CityBus is rather different than how Nextbus does it. I referred to the Nextbus code as a starting point, but each line has been adapted for the CityBus integration.
Will do -- I'm currently using Windows so tested the integration with HACS. Will get a proper environment running with WSL or a Linux VM/partition later this week.
Where would I add this? I didn't see such test coverage for Nextbus.
You can't add CityBus as a "feature" to Nextbus. They use completely different API endpoints and schemas. The configuration alone requires different config options compared to what Nextbus asks. |
@joostlek please let me know if I can mark this PR as ready for review, or if there are any other changes I should make. I can't seem to find any documentation on adding unit test coverage. |
There is documentation about code coverage. Nextbus has code coverage. Can't link it at the moment |
Here's the config flow tests from Nextbus, you may be able to adapt it for this integration. There's some general documentation on tests at https://developers.home-assistant.io/docs/development_testing |
Proposed change
This integration is based off of the NextBus integration and adds support for the CityBus API.
CityBus is a bus service that operates in Lafayette, Indiana.
This integration makes it possible for HA users to see upcoming bus times for the different route/direction/stop combinations on CityBus.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: