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
921430d497
Import Generator from collections.abc (3) ( #120916 )
2024-07-01 12:09:11 +02:00
Marc Mueller
33ed4fd862
Import Generator from typing_extensions (3) ( #118990 )
2024-06-06 17:28:59 +02:00
Joost Lekkerkerker
763df83cdb
Remove Nextbus YAML import ( #115277 )
2024-04-09 18:34:35 +02:00
Joost Lekkerkerker
f3ba713289
Use FlowResultType enum in config flow tests N-Z ( #114682 )
...
Use FlowResultType enum in config flow tests
2024-04-03 09:53:20 +02:00
Joost Lekkerkerker
5d500cb74b
Use is in enum comparison in config flow tests K-O ( #114672 )
2024-04-02 11:21:42 -10:00
Sid
00ec7f11f0
Enable Ruff rule PT007 ( #113764 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Marc Mueller
1722e23df8
Add empty line after module docstring [tests l-p] ( #112710 )
2024-03-08 14:55:15 +01:00
Joost Lekkerkerker
a82410d5e9
Deduplicate constants E-Z ( #105657 )
2023-12-13 17:05:37 +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
e652d37f29
Use data update coordinator in NextBus to reduce api calls ( #100602 )
2023-10-02 10:56:10 +02:00
Ian
c3f74ae022
Add config-flow to NextBus ( #92149 )
2023-09-19 17:10:29 +02:00
epenet
50cbabb2d8
Add type hints to integration tests (part 15) ( #88006 )
2023-02-15 10:00:49 +01:00
Franck Nijhof
ef800335fb
Enable Ruff PT022 ( #86792 )
...
* Enable Ruff PT022
* Adjust found cases
2023-01-27 13:57:06 +01:00
Ian
a6cfbd4072
Nextbus upcoming sort as integer ( #61416 )
2021-12-17 09:39:55 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest ( #44746 )
2021-01-01 22:31:56 +01:00
Erik Montnemery
4e77969f5e
Drop use of mock_mqtt_component ( #37013 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-23 10:17:22 -07:00
Paulus Schoutsen
276f3afb00
Do async_setup_platform in background ( #36244 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-31 22:18:30 -07:00
Paulus Schoutsen
2af984917e
Use asynctest-mock in most places ( #35109 )
...
* Use asynctest-mock in most places
* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Ian
4f1f4a1b4f
Nextbus: Sort results for upcoming times ( #29811 )
...
Sort upcoming times across all direction's for a particular route and
stop.
2019-12-10 09:22:13 +01:00
Bas Nijholt
1ab1808307
Sort imports according to PEP8 for components starting with "N" ( #29773 )
2019-12-09 14:46:24 +01:00
springstan
20fdcbadff
Move imports to top for nextbus ( #29520 )
...
* Move imports to top for nextbus
* Fix test_sensor.py failed tests
2019-12-05 21:56:42 +01:00
Grodesh
f8712b4d7f
Update nextbus stop tag to accept strings ( #27765 )
2019-11-06 07:24:11 +01:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Ian
c2e7445271
Add new nextbus sensor ( #20197 )
...
* Added new nextbus sensor
* Fix order in requirements_all after merge
* Add more flexible parsing of JSON lists
* Undo tox change
2019-04-26 19:51:58 -05:00