Commit Graph

140 Commits (985e42e50c2205f7dbaaac4d369d67bd9c97f758)

Author SHA1 Message Date
epenet c6e0e93680
Cleanup mock_get_source_ip from tests (#118459) 2024-05-30 09:37:01 +02:00
epenet 44f715bd02
Use issue_registry fixture in component tests (#118041) 2024-05-24 15:54:20 +02:00
Pete Sage 1ad2e4951d
Fix Sonos album artwork performance (#116391) 2024-05-24 10:42:45 +02:00
J. Nick Koston 3ad489d835
Fix flakey sonos test teardown (#117222)
https://github.com/home-assistant/core/actions/runs/9039805087/job/24843300480?pr=117214
2024-05-10 21:24:49 -04:00
Pete Sage 731fe17224
Fix Sonos select_source timeout error (#115640) 2024-05-07 10:08:12 +02:00
J. Nick Koston ad0aabe9a1
Fix some flapping sonos tests (#116343) 2024-04-28 09:21:32 -05:00
J. Nick Koston bf91ab6e2b
Fix sonos events delaying shutdown (#116337) 2024-04-28 08:54:34 -05:00
Erik Montnemery db8597a742
Reduce scope of JSON/XML test fixtures (#116197) 2024-04-25 19:12:36 -05:00
Pete Sage 24a1f0712f
Fix Sonos music library play problems (#113429) 2024-04-24 14:03:40 +02:00
Pete Sage 553c147933
Fix sonos switch test failures (#115052) 2024-04-06 12:51:21 -10:00
epenet 24f83c5890
Use is in FlowResultType enum comparison in tests (#114917)
* Use is in FlowResultType enum comparison in tests

* Adjust auth

* Adjust systemmonitor

* Once more

* Add comment
2024-04-05 10:40:14 +02:00
J. Nick Koston e0e54ab9d3
Migrate more sonos tasks to use eager_start (#114697) 2024-04-04 11:43:15 -10:00
Pete Sage 95ef087fa8
Fix Sonos Tests failing intermittently on CI (#114873) 2024-04-04 10:34:23 -10: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
Pete Sage f26a7843c6
Fix Sonos play imported playlists (#113934) 2024-04-03 00:10:15 +02:00
Robert Resch 67c334f842
Fix ruff issue in sonos (#114616) 2024-04-02 10:30:01 +02:00
Pete Sage 31cd41adb8
Display sonos album title with URL encoding (#113693)
* unescape the title

When extracting the title from the item_id, it needs to be unescaped.

* sort imports
2024-04-02 10:11:45 +02:00
J. Nick Koston be398e0a3f
Fix flakey sonos test test_creating_entry_sets_up_media_player (#114539) 2024-03-31 13:49:24 -10:00
J. Nick Koston d63adb6350
Improve sonos test synchronization (#114468) 2024-03-30 06:34:47 -10:00
J. Nick Koston 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
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Sid 82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Pete Sage 46ce438b6d
Sonos reduce test time (#111688) 2024-03-12 21:14:27 +01:00
J. Nick Koston 6ff8d7d2b9
Make sonos ssdp discovery callback a callback function (#113107) 2024-03-11 13:50:04 -10:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 7d6251ca08
Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +01:00
Marc Mueller 438d3b01b9
Use builtin TimeoutError [o-s] (#109682) 2024-02-05 12:14:37 +01:00
jjlawren 68797feac5
Do not suggest area for portable Sonos speakers (#109350)
* Do not suggest area for portable speakers

* Update tests

* Improve readability, update tests
2024-02-03 09:20:10 +01:00
jjlawren 0ae4d017b9
Add subwoofer crossover support to Sonos Amp devices (#106290) 2023-12-23 10:25:20 +01:00
Aarni Koskela 706add4a57
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Jan Bouwhuis facdc5e862
Fix - Make sure logging is in time in sonos CI test (#101109)
Make sure logging is in time in sonos CI test
2023-09-29 23:16:59 +02:00
J. Nick Koston 0eca433004
Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567) 2023-09-19 18:58:46 +02:00
Marc Mueller 8b0fdd6fd2
Use asyncio.timeout [s-z] (#98452) 2023-08-15 14:34:18 +02:00
Marc Mueller 23810752ed
Fix mock assert_called_with (#96929)
* Fix mock assert_called_with

* Fix sonos test

* Revert zeroconf test changes
2023-07-20 08:31:37 +02:00
Joost Lekkerkerker 81ce6e4797
Add entity translations to Sonos (#96167)
* Add entity translations to Sonos

* Add entity translations to Sonos

* Add entity translations to Sonos

* Add entity translations to Sonos
2023-07-15 00:36:26 +02:00
Allen Porter 12129e9d21
Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

* Remove timeout behavior and update callers that depend on it today

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
PeteRager 6a8d18ab35
Sonos setup fails with unhandled exceptions on discovery messages (#90648)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-05-30 10:09:13 -05:00
Ville Skyttä 940942a74a
Import `util.dt` as `dt_util` in `components/[p-s]*` (#93761) 2023-05-30 00:09:42 +03:00
epenet 6836e15d98
Add type hints to tests (#92477) 2023-05-04 11:25:35 +02:00
[pʲɵs] 6013584b7b
Add balance entity for Sonos speakers (#85205) 2023-04-23 01:18:17 +02:00
jjlawren d5a6840588
Create repair issue if Sonos subscriptions fail (#87437)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-04-22 19:28:04 +02:00
Matthias Alphart 0ba339e56c
Run `socket.gethostbyname` in executor in Obihai and Sonos (#91190)
* Run  in executor in Obihai and Sonos

* fix Sonos test

* fix sonos test differently (review)
2023-04-12 09:58:27 +02:00
PeteRager 73ed6e039a
Improve logging for unavailable sonos hosts (#90172)
* Repeated warning messages on unavailable manually specified hosts

Sonos logs warning messages every 1 minute 12 seconds for hosts that are not on-line.  This fixes the issue and the warning will be logged the first time, and subsequent logs messages will be at DEBUG level

* Update homeassistant/components/sonos/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Log info message when reconnect succeeds

* Use pop to simplify code

* Add additional test, fix key error with pop

* Use pop with default return value

* Update tests/components/sonos/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/sonos/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/sonos/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/sonos/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/sonos/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update comment, remove unneeded line of code

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-23 16:15:55 +01:00
epenet 9762b684c2
Adjust entity registry access in tests (3) (#88964) 2023-03-01 16:04:40 +01:00
epenet 3a9adacdde
Add type hints to integration tests (part 20) (#88179) 2023-02-15 15:23:34 +01:00
epenet aa00114c2f
Add return type to async tests without arguments (#87612) 2023-02-07 10:26:56 +01:00
Franck Nijhof e50a531cd9
Code styling tweaks to the tests - Part 2 (#86662)
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2023-01-26 01:23:53 +01:00
jjlawren 1b592e6885
Use subscription callbacks to discover Sonos speakers (#85411)
fixes undefined
2023-01-08 09:50:18 -10:00
Steven Looman 731f618028
Make home assistant discoverable via UPnP/SSDP (#79820) 2022-10-15 14:00:46 -04:00
epenet 0d696b84b2
Cleanup root component imports in tests (#78893) 2022-09-21 06:57:41 -10:00