Commit Graph

193 Commits (dev)

Author SHA1 Message Date
Erik Montnemery 0d7608f7c5
Deprecate DeviceEntry.suggested_area (#149730) 2025-08-01 10:34:34 +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 be7735964b
Sonos remove unneeded mocking from test (#147064) 2025-07-04 23:02:38 +02:00
Pete Sage 345ec97dd5
Add enum sensor for Sonos Power Source (#147449)
* feat: add power source sensor

* fix: translations

* fix:cleanup

* fix: simpify

* fix: improve coverage

* fix: improve coverage

* fix: add missing test

* fix: call it charging_base

* fix: disable entity by default

* update snapshots

* Update homeassistant/components/sonos/strings.json

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* fix: update test

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-06-25 23:49:06 +02:00
Pete Sage d8258924f7
Remove mapping of entity_ids to speakers in Sonos (#147506)
* fix

* fix: change entity_id mappings

* fix: translate errors

* fix:merge issues

* fix: translate error messages

* fix: improve test coverage

* fix: remove unneeded strings
2025-06-25 18:29:23 +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 afc0a2789d
Update Sonos to use SonosConfigEntry and runtime data (#145512)
* fix: initial

* fix: cleanup

* fix: cleanup

* fix: cleanup

* fix: SonosConfigEntry

* add config_entry.py

* fix: sonos_data to runtime_data

* fix: move to helpers.py
2025-06-12 14:05:51 +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
epenet de4a5fa30b
Remove unnecessary DOMAIN alias in tests (s-z) (#146010) 2025-06-02 08:48:37 +02:00
Erik Montnemery 4e1d5fbeb0
Add WS command to help reset custom entity_id (#145504)
* Add WS command to help reset custom entity_id

* Calculate suggested object id from entity properties

* Fix logic and add additional tests

* Adjust test

* Update folder_watcher test

* Handle current entity id matches the automatic entity id

* Don't store calculated_object_id

* Update snapshots

* Update snapshots

* Update test

* Tweak logic for reusing current entity_id

* Improve test

* Don't assign same entity_id to several entities

* Prioritize custom entity name

* Update snapshots

* Update snapshots
2025-05-26 19:28:27 +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
Simone Chemelli 484a547758
Fix pylance warning on SnapshotAssertion import (#145206) 2025-05-19 13:55:48 +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
Josef Zweck bf69d4e0a8
Add search to media_player (#140321)
* Add search to media_player

* rename attr

* Add searchable property

* add pagination parameters

* Add suggested changes

* Apply suggestions

* Fix cast tests

* Fix first set of components

* update snapshot

* More tests

* more test fixes

* Rename attr

* first own test

* Add to google test

* Add service test

* Rename search query arg

* Add required feature to search service

* remove kwarg

* Update homeassistant/components/media_player/__init__.py

Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>

* fix hue test

---------

Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2025-04-16 23:09:16 +02:00
Pete Sage d560083e15
Album art not available for Sonos media library favorites (#140557)
* get album art uri for favorites

* add tests

* update typing

* update typing

* update typing

* simplify
2025-03-16 14:09:21 +01:00
Pete Sage 5f8564bfc5
Fix audiobooks always start from beginning on Sonos (#140663)
* play audible favorite

* play audible favorite

* simplify tests
2025-03-16 10:11:08 +01:00
Pete Sage 1f6658fca0
Prevent ipv6 discovery messages for Sonos (#139648) 2025-03-12 15:19:09 -04:00
Pete Sage 6c54f8dff2
Fix browsing Audible Favorites in Sonos (#140378)
* initial commit

* updates

* update test data
2025-03-11 14:56:41 +01:00
Pete Sage e9fcef1b57
Fix TV input source option for Sonos Arc Ultra (#138778)
initial commit
2025-02-18 08:43:00 -06:00
Erik Montnemery 4b34d1bbb5
Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

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

* Improve docstrings and strings.json

---------

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

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
epenet d0a188b86d
Standardize homeassistant imports in component tests (m-z) (#136807) 2025-01-29 08:57:57 +01:00
epenet 64500e837f
Use new ServiceInfo location in component tests (part 1) (#136057) 2025-01-20 13:09:34 +01:00
Pete Sage acfc4711cd
Fix Sonos get_queue action may fail if track metadata is missing (#130756)
initial commit
2024-11-16 11:40:49 -05:00
Jan-Philipp Benecke 1d425f3913
Use debug/warning instead of info log level in components [s] (#126141)
* Use debug/warning instead of info log level in components [s]

* Fix merge error
2024-09-18 21:33:52 +02:00
Pete Sage 2c48f9aa4c
FIx Sonos announce regression issue (#125515)
* initial commit

* initial commit
2024-09-08 17:34:27 +02:00
Paulus Schoutsen 56b4ddc6b4
Add model ID to Sonos (#125364) 2024-09-05 16:52:17 -04:00
Pete Sage b4e20409de
Add Sonos tests and update error handling for unknown media (#124578)
* initial commit

* simplify tests
2024-09-04 20:03:26 +02: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
Joost Lekkerkerker 2577fb804b
Add sonos snapshot test (#124036) 2024-08-19 11:00:33 +02:00
Pete Sage 153eef16bb
Add Sonos Test for plex media player enqueue options (#124120)
initial commit
2024-08-17 16:29:27 +02:00
Pete Sage 7efd8089c8
Add Sonos test for media_player play, pause, stop, previous, next (#122978)
* initial commit

* update to use constant

* retrigger checks
2024-08-17 13:47:27 +02:00
Joost Lekkerkerker 1614e2c825
Use constants in Sonos media player tests (#124037) 2024-08-16 16:58:42 -05:00
Pete Sage 1f214bec93
Add Sonos tests for media_player shuffle and repeat (#122816)
* initial commit

* initial commit

* update comments
2024-08-16 11:49:00 +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
Pete Sage cfef72ae57
Add Sonos tests for media_player volume (#122283) 2024-07-29 12:56:26 +02:00
Pete Sage d1d2ce1270
Sonos tests snapshot and restore services (#122198) 2024-07-20 11:16:48 +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
Pete Sage cbfb587f2d
Sonos add tests for media_player.play_media favorite_item_id (#120120) 2024-06-22 09:08:12 +02:00
Pete Sage ebbb63cd08
Fix Sonos album images with special characters not displaying in media browser UI (#118249)
* initial commit

* initial commit

* simplify tests

* rename symbol

* original_uri -> original_url

* change symbol name

---------

Co-authored-by: Dave T <17680170+davet2001@users.noreply.github.com>
2024-06-19 22:38:49 +01:00