Commit Graph

94 Commits

Author SHA1 Message Date
Pete Sage
b93f4aabf1 Add tests for Sonos media metadata (#152622) 2025-09-30 20:24:57 +02:00
Pete Sage
51fbccd125 Fix Sonos CI issue part 2 (#150529)
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2025-08-13 12:26:24 +02:00
Pete Sage
b7853ea9bd Fix Sonos CI Issue (#150518)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-08-12 23:18:59 +02:00
Pete Sage
268f0d9e03 Add Tests for Sonos Alarms (#150014) 2025-08-09 13:47:16 +02:00
Pete Sage
981ae39182 Fix dialog enhancement switch for Sonos Arc Ultra (#150116) 2025-08-08 22:11:32 +02:00
Franck Nijhof
42b50c71ec Revert "Add tests for Sonos Alarms" (#148319) 2025-07-07 11:54:36 +02:00
Pete Sage
d997efc500 Add tests for Sonos Alarms (#146308) 2025-07-05 17:39:52 +02:00
Pete Sage
c9e9575a3d Add tests for join and unjoin service calls in Sonos (#145602)
* fix: add tests for join and unjoin

* fix: update comments

* fix: update comments

* fix: refactor to common functions

* fix: refactor to common functions

* fix: add type def

* fix: add return types

* fix: add return types

* fix: correct type annontation for uui_ds

* fix: update comments

* fix: merge issues

* fix: merge issue

* fix: raise homeassistanterror on timeout

* fix: add comments

* fix: simplify test

* fix: simplify test

* fix: simplify test
2025-06-25 11:38:51 +02:00
Pete Sage
43d8a151ab Remove internals from Sonos test_init.py (#147063)
* fix: test init

* fix: revert

* fix: revert

* fix: revert

* fix: revert

* fix: simplify
2025-06-18 09:21:21 +02:00
Pete Sage
fd30dd0aee Add tests for sonos switch alarms on and off (#146314)
* fix: add tests for switch on/off

* fix: simplify

* fix: simplify

* fix: comment

* fix: comment
2025-06-08 11:45:20 +02:00
Pete Sage
e5f95b3aff Add diagnostics tests for Sonos (#146040)
* fix: add tests for diagnostics

* fix: add new files

* fix: add new files
2025-06-02 15:12:34 +02:00
Pete Sage
73811eac0a Add support for music library folder to Sonos (#139554)
* initial prototype

* use constants

* make playing work

* remove unneeded code

* remove unneeded code

* fix regressions issues

* refactor add_to_queue

* refactor add_to_queue

* refactor add_to_queue

* simplify

* add tests

* remove bad test

* rename constants

* comments

* comments

* comments

* use snapshot

* refactor to use add_to_queue

* refactor to use add_to_queue

* add comments, redo snapshots

* update comment

* merge formatting

* code review changes

* fix: merge issue

* fix: update snapshot to include new can_search field
2025-05-20 21:48:33 +02:00
Daniël van den Berg
a21e586140 Show Sonos playlists under favorites (#142357)
* Update media_browser.py

* Update favorites.py

* Update media_player.py

* Update media_browser.py

* Update media_player.py

* Update favorites.py

* Update media_browser.py

* Update media_player.py

* Update favorites.py

* Added/fixed testing for showing sonos native playlists in the media browser

* Create a DidlFavorite to wrap playlists.

* Processed PR feedback
2025-05-14 12:14:20 +02:00
Pete Sage
e9fcef1b57 Fix TV input source option for Sonos Arc Ultra (#138778)
initial commit
2025-02-18 08:43:00 -06:00
epenet
64500e837f Use new ServiceInfo location in component tests (part 1) (#136057) 2025-01-20 13:09:34 +01:00
Pete Sage
5824d06fd7 Add get_queue action for Sonos (#124707)
* initial commit

* use constants

* use constants

* update typing

* add queue fixture

* remove blank line

* update docstring

* update icons

* use list comprehension
2024-08-28 16:19:48 +02:00
Pete Sage
8bc9fd23bb Add Sonos tests for announce and update error handling (#124539)
* initial commit

* update error message

* use match for error message
2024-08-25 21:25:20 +02:00
Pete Sage
d327ec904c Add Sonos tests for media_player play Sonos Playlist and improve error handling (#124126)
* initial commit

* initial commit

* initial commit

* updates

* add json fixture

* use match on pytest.raises
2024-08-20 18:38:04 +02:00
epenet
f66b539027 Add missing hass type hint in component tests (s) (#124272) 2024-08-20 12:53:29 +02:00
epenet
3e967700fd Add missing return type in test __init__ method (part 2) (#123939)
* Add missing return type in test __init__ method (part 2)

* Adjust

* One more

* One more

* More
2024-08-14 17:59:15 +02:00
epenet
24a8060f43 Improve type hints in sonos tests (#123891) 2024-08-14 12:48:36 +02:00
Pete Sage
f1084a57df Fix Sonos media_player control may fail when grouping speakers (#121853) 2024-07-31 20:36:59 +02:00
epenet
7bbbda8d2b Fix implicit-return in sonos tests (#122780) 2024-07-29 21:52:15 +02:00
epenet
45ab9cae1a Improve type hints for silent_ssdp_scanner in tests (#121309) 2024-07-05 16:32:10 +02:00
Pete Sage
3cf52a4767 Sonos add tests for media_player.play_media share link (#120169) 2024-06-22 19:13:37 +02:00
Pete Sage
88039597e5 Sonos add tests for media_player.play_media library track (#120119) 2024-06-22 09:09:38 +02:00
epenet
38a6e666a7 Add missing return type to some test functions (#119665) 2024-06-14 08:26:45 +02:00
epenet
7d631c28a6 Ignore attribute-defined-outside-init pylint warnings in tests (#119470) 2024-06-12 12:22:31 +02:00
epenet
c6e0e93680 Cleanup mock_get_source_ip from tests (#118459) 2024-05-30 09:37:01 +02:00
Pete Sage
1ad2e4951d Fix Sonos album artwork performance (#116391) 2024-05-24 10:42:45 +02:00
Pete Sage
731fe17224 Fix Sonos select_source timeout error (#115640) 2024-05-07 10:08:12 +02: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
J. Nick Koston
e0e54ab9d3 Migrate more sonos tasks to use eager_start (#114697) 2024-04-04 11:43:15 -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
J. Nick Koston
6ff8d7d2b9 Make sonos ssdp discovery callback a callback function (#113107) 2024-03-11 13:50:04 -10:00
Marc Mueller
7d6251ca08 Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +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
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
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
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
[pʲɵs]
6013584b7b Add balance entity for Sonos speakers (#85205) 2023-04-23 01:18:17 +02: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
jjlawren
07a46dee39 Additional surround controls for Sonos (#73805) 2022-06-22 09:08:31 +02:00
jjlawren
30e71dd96f Add support for Sonos loudness switch (#72572) 2022-05-30 16:09:14 +02:00