Commit Graph

7 Commits (8020bec47bff5c6e5f08eb1e4dafaeaa85238bd9)

Author SHA1 Message Date
epenet 7e56b595a0
Do not link nextbus coordinator to config entry (#128151)
* Do not link nextbus coordinator to config entry

* Refactor tests and add specific failure test

* Use ConfigEntryNotReady

* Cleanup coordinator
2024-10-13 14:13:37 +02:00
Ian dccdb71b2d
Make NextBus coordinator more resilient and efficient (#126161)
* Make NextBus coordinator more resilient and efficient

Resolves issues where one request failing will prevent all agency
predictions to fail. This also removes redundant requests for
predictions that share the same stop.

* Add unload entry test

* Prevent shutdown if the coordinator is still needed
2024-09-20 10:18:13 +02:00
Ian 3e8d3083ac
Refactor NextBus integration to use new API (#121133)
* Refactor NextBus integration to use new API

This removes the `messages`, `directions`, and `attribution` attributes
from the sensor. Those may be added back in the future with additional
refactoring.

Some existing sensors may be broken today because of deprecated Agency
names. This patch will not migrate them as the migration path is
ambiguous. Setting up again should work though.

* Move result indexing outside of try/except
2024-07-24 18:18:21 +02:00
Marc Mueller 1722e23df8
Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
Ian 51c3a5d11d
Nextbus: Listify directions (#103337)
When a single value is returned, the list wrapper is not present in the
json payload. This patch ensures that the result is always a list.
2023-11-04 08:56:27 +01:00
Ian fe316f2233
Fix key error in config flow when duplicate stop names exist (#101491) 2023-10-05 22:11:15 +02:00
Ian c3f74ae022
Add config-flow to NextBus (#92149) 2023-09-19 17:10:29 +02:00