Commit Graph
140 Commits
Author SHA1 Message Date
epenetandGitHub ad84ff18eb Use remove_device helper in tests (1/2) (#116240)
* Use remove_device helper in tests

* Update test_tag.py

* Update test_tag.py
2024-04-30 12:52:33 +02:00
J. Nick KostonandGitHub 8e645c9b32 Fix flakey cast discovery test (#115063) 2024-04-06 13:15:14 -10:00
0d66d298ec Enable Ruff RET504 (#114528)
* Enable Ruff RET504

* fix test

* Use noqa instead of cast

* fix sonos RET504

---------

Co-authored-by: Martin Hjelmare <[email protected]>
2024-04-06 11:07:37 +02:00
Joost LekkerkerkerandGitHub b9281327c4 Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +02:00
Joost LekkerkerkerandGitHub 9b41e3d124 Use is in enum comparison in config flow tests A-E (#114669) 2024-04-02 11:22:05 -10:00
J. Nick KostonandGitHub ce9d4c8683 Fix flakey cast discovery stop test (#114605)
https://github.com/home-assistant/core/actions/runs/8515215623/job/23322322954?pr=114602
2024-04-01 21:34:54 -04:00
Paulus SchoutsenandGitHub f01235ef74 Re-organize conversation integration (#114502)
* Re-organize conversation integration

* Clean up 2 more imports

* Re-export models

* Fix imports

* Uno mas

* Rename agents to models

* Fix cast test that i broke?

* Just blocking till I'm done

* Wrong place
2024-03-31 00:05:25 -04:00
J. Nick KostonandGitHub 9a79320861 Mark executor jobs as background unless created from a tracked task (#114450)
* Mark executor jobs as background unless created from a tracked task

If the current task is not tracked the executor job should not
be a background task to avoid delaying startup and shutdown.

Currently any executor job created in a untracked task or
background task would end up being tracked and delaying
startup/shutdown

* import exec has the same issue

* Avoid tracking import executor jobs

There is no reason to track these jobs as they are always awaited
and we do not want to support fire and forget import executor jobs

* fix xiaomi_miio

* lots of fire time changed without background await

* revert changes moved to other PR

* more

* more

* more

* m

* m

* p

* fix fire and forget tests

* scrape

* sonos

* system

* more

* capture callback before block

* coverage

* more

* more races

* more races

* more

* missed some

* more fixes

* missed some more

* fix

* remove unneeded

* one more race

* two
2024-03-30 00:16:53 -04:00
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <[email protected]>
Co-authored-by: Marc Mueller <[email protected]>
Co-authored-by: J. Nick Koston <[email protected]>
2024-03-26 00:02:16 +01:00
00ec7f11f0 Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <[email protected]>
2024-03-19 09:01:07 +01:00
69564b1a17 Add ruff rule PIE800 (#113619)
Co-authored-by: J. Nick Koston <[email protected]>
2024-03-16 16:31:30 -10:00
Marc MuellerandGitHub 38adfbf1a3 Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
J. Nick KostonandGitHub 33ff6b5b6e Avoid creating tasks for checking integrations platforms (#110795)
* Avoid creating tasks for checking integrations platforms

This is a followup to #110743 to avoid creating a task to check
if the integration platform exists. We created tasks because
we needed to await async_get_integrations but since its always
called from EVENT_COMPONENT_LOADED firing, we can use the
async_get_loaded_integration version which does not need
to be awaited. This eliminates one task for every loaded
component

* there is no more race risk

* reduce

* coro or callback

* reduce

* tweak

* race safe

* fix type

* fixes

* use built-in helper to make it smaller

* use built-in helper to make it smaller

* use built-in helper to make it smaller

* add coverage to ensure exceptions are logged

* improve readability a bit

* platforms
2024-02-18 01:07:18 +01:00
Erik MontnemeryandGitHub 06a21d4ed9 Bump pychromecast to 14.0.0 (#108374)
* Pass unregister callback to cast HomeAssisstantController

* Update tests

* Bump pychromecast to 14.0.0

* Fix lint warning, adjust tests

* Improve test coverage
2024-02-15 20:14:01 +01:00
J. Nick KostonandGitHub 77f416fa04 Ensure cast tests add config entry before updating it (#110441)
* Ensure cast tests add config entry before updating it

* time to walk away for a bit

* missed two
2024-02-13 05:01:37 +01:00
J. Nick KostonandGitHub 92842c28d2 Ensure cast tests add config entry before updating it (#110416) 2024-02-12 23:06:13 +01:00
Marc MuellerandGitHub c82933175d Use builtin TimeoutError [a-d] (#109678) 2024-02-05 11:31:33 +01:00
Marc MuellerandGitHub d2dee9e327 Update ruff to 0.1.15 (#109303) 2024-02-01 13:29:01 +01:00
Ville SkyttäandGitHub 24b1e01d71 Update Ruff to 0.1.8, avoid linter/formatter conflicts (#106080)
* Disable Ruff rules that may conflict with the formatter

* Upgrade Ruff to 0.1.8

- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8

* Format with Ruff 0.1.8
2023-12-20 23:55:09 +01:00
706add4a57 Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <[email protected]>
2023-11-27 14:38:59 +01:00
Jan-Philipp BeneckeandGitHub 9ab1cb83d8 Update a-c* tests to use entity & device registry fixtures (#103793)
* Update a-c* tests to use entity & device registry fixtures

* Revert some changes

* Revert formatting

* retrigger CI
2023-11-12 13:45:30 -05:00
Ville SkyttäandGitHub 3b4774d9ed Remove unnnecessary pylint configs from components/[a-d]* (#98911) 2023-08-24 00:54:02 +02:00
Erik MontnemeryandGitHub b254218dd6 Remove base_url configuration option from tts (#94905) 2023-06-21 11:20:33 +02:00
Erik MontnemeryandGitHub 02b76be0ba Use config entry setup in cast tests (#93595)
* Use config entry setup in cast tests

* Remove import step from config flow

* Remove import tests

* Fix tests
2023-05-27 21:07:54 -04:00
Erik MontnemeryandGitHub e3c16e634b Allow exposing entities not in the entity registry to assistants (#92363) 2023-05-02 22:08:09 +02:00
Erik MontnemeryandGitHub 41ea8fa9b4 Guess media type when cast is playing media without media type (#90048) 2023-03-21 10:01:35 -04:00
Paulus SchoutsenandGitHub f465561536 Fix dangling task for cast (#88285) 2023-02-17 18:43:40 +01:00
Franck NijhofandGitHub ed79265843 Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
Franck NijhofandGitHub 9030ca05b1 Enable Ruff SIM118 (#87772) 2023-02-15 12:39:12 +01:00
epenetandGitHub fa7acb4f0d Add type hints to integration tests (part 3) (#87844) 2023-02-10 16:05:01 +01:00
epenetandGitHub 807c69f621 Add type hints to integration tests (b-c) (#87698) 2023-02-08 18:08:43 +01:00
Franck NijhofandGitHub c56832bb2c Enable Ruff SIM300 (#86793) 2023-01-30 11:03:23 +01:00
Franck NijhofandGitHub 62dcbe5258 Enable Ruff PT001 (#86730) 2023-01-26 18:05:05 +01:00
J. Nick KostonandGitHub 5285d057d2 Migrate cast to use async_forward_entry_setups (#86558)
Replaces deprecated async_setup_platforms with async_forward_entry_setups
2023-01-25 10:12:58 +01:00
epenetandGitHub 30bf0634fe Add per-file-ignore to pylint (#86289) 2023-01-22 17:26:24 +01:00
Franck NijhofandGitHub 24fdd588fd Code styling tweaks to the tests - Part 1 (#86192) 2023-01-20 13:52:46 +01:00
Franck NijhofandGitHub 05c32c51fd Code styling tweaks to the Cast integration (#85560) 2023-01-10 09:57:13 +01:00
epenetandGitHub 0ac581a0b1 Cleanup EntityFeature in tests (#78859) 2022-09-21 10:48:55 +02:00
epenetandGitHub 41d2ac3943 Cleanup MediaClass and MediaType in tests (#78817)
Cleanup MediaClass/MediaType in tests
2022-09-20 17:55:13 +02:00
Franck NijhofandGitHub 7cd68381f1 Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Erik MontnemeryandGitHub 996544da2d Poll cast groups when media player is added or reconnected (#74610) 2022-07-07 14:51:16 +02:00
J. Nick KostonandGitHub 6c3baf03aa Make dispatcher setup lazy (#74374) 2022-07-04 14:58:35 +02:00
00810235c9 Track tasks adding entities (#73828)
* Track tasks adding entities

* Update homeassistant/config_entries.py

* fix cast tests

Co-authored-by: J. Nick Koston <[email protected]>
2022-06-29 09:38:35 +02:00
Franck NijhofandGitHub 39a00ffe09 Automatically onboard Cast (#73813) 2022-06-22 09:49:54 +02:00
Erik MontnemeryandGitHub 44f332ed5f Improve cast HLS detection (#72787) 2022-05-31 20:35:56 -07:00
Erik MontnemeryandGitHub e5870c65ee Add missing cast test fixture (#71595) 2022-05-09 18:41:25 +02:00
Erik MontnemeryandGitHub d284e579bb Improve Google Cast detection of HLS playlists (#71564) 2022-05-09 13:57:32 +02:00
d9a7c4a483 Only lookup unknown Google Cast models once (#71348)
Co-authored-by: Paulus Schoutsen <[email protected]>
2022-05-05 11:04:00 -07:00
Erik MontnemeryandGitHub 66551e6fcb Add state buffering to media_player and use it in cast (#70802) 2022-04-27 09:49:50 +02:00
ce302f4540 Play first item in m3u and pls playlists when casting (#70047)
Co-authored-by: Paulus Schoutsen <[email protected]>
2022-04-26 13:16:37 -07:00