Commit Graph

150 Commits (44f1d928907727474afed6aeec70095f6b4c46b6)

Author SHA1 Message Date
Franck Nijhof 5f728b955e
Migrate Sonos to new entity naming style (#74909) 2022-07-10 13:19:13 -07:00
jjlawren ba7ad1029c
Remove legacy Sonos grouping services (#74476) 2022-07-07 12:17:13 +02:00
jjlawren d203cb0658
Minimize Sonos `media_player.unjoin` timeout (#74549) 2022-07-07 09:43:10 +02:00
jjlawren 329ecc74c4
Optimize Sonos join behavior when using `media_player.join` (#74174)
Optimize Sonos media_player.join service
2022-06-29 15:23:22 +02:00
jjlawren 4bfdb1433e
Optimize Sonos unjoin behavior when using `media_player.unjoin` (#74086)
* Coalesce Sonos unjoins to process together

* Refactor for readability

* Skip unjoin call if already ungrouped

* Store unjoin data in a dedicated dataclass

* Revert import adjustment
2022-06-28 13:19:27 -07:00
jjlawren b0f4b3030f
Extend timeouts for Spotify and Plex playback on Sonos (#73803) 2022-06-23 00:58:10 +02:00
jjlawren 4f75de2345
Fix errors when unjoining multiple Sonos devices simultaneously (#73133) 2022-06-06 15:18:07 -07:00
jjlawren d368b9e24f
Remove announce workaround for Sonos (#72854) 2022-06-01 22:12:38 -07:00
jjlawren 1ef59d1e73
Cleanup handling of new enqueue & announce features in Sonos (#72801) 2022-05-31 21:39:07 -07:00
jjlawren 275ea5b150
Support add/next/play/replace enqueue options in Sonos (#72800) 2022-05-31 20:36:45 -07:00
Erik Montnemery 47d0cc9b09
Update integrations to pass target player when resolving media (#72597) 2022-05-27 09:05:06 -07:00
Paulus Schoutsen 86570fba19
Convert media player enqueue to an enum (#72406) 2022-05-26 13:57:00 -07:00
jjlawren bbe807c655
Deprecate legacy Sonos grouping services (#71226) 2022-05-02 23:01:44 -07:00
jjlawren 1f1932d224
Fix Sonos races related to grouping and startup (#71026) 2022-04-28 14:26:29 -07:00
jjlawren 6151306e3d
Use standard attribute for Sonos group members (#70924) 2022-04-27 18:59:05 +02:00
epenet 190ef4ee35
Use EntityFeature enum in components (s** 2/2) (#69441) 2022-04-07 15:06:34 +02:00
jjlawren 653305b998
Support multiple Plex servers in media browser (#68321) 2022-03-21 15:48:44 -07:00
jjlawren f75d621888
Normalize enqueuing Plex media on Sonos (#68132) 2022-03-17 13:52:59 -07:00
jjlawren 80ff497cfc
Rework available Sonos sources (#67931) 2022-03-11 15:57:57 -08:00
jjlawren cfd763db40
Refactor Sonos media metadata handling (#66840)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-02-23 08:58:00 -08:00
Paulus Schoutsen e0ff7dc2e7
Fix radio browser on Sonos (#67017) 2022-02-22 08:51:41 +01:00
Erik Montnemery 5be5a014f3
Adjust Sonos for updated Spotify media browsing (#66508) 2022-02-14 20:15:09 +01:00
Paulus Schoutsen 3bce870c6d
Add helper for media players to handle HA hosted media (#66120)
* Sonos to sign all HASS urls

* Don't sign if queries in url

* Extract media player hass URL handling to helper
2022-02-09 12:50:33 -08:00
jjlawren a7fd477c64
Refactor Sonos polling (#65722)
* Refactor Sonos polling

Explicitly rename fallback polling
Catch soco exceptions centrally where possible
Create SonosPollingEntity subclass
Remove unnecessary soco_error fixture argument
Remove unnecessary polling in update_volume()
Adjust log levels and wording
Set explicit timeout on library

* Adjust logging to use raised exceptions

* Simplify availabiliity checks when using built-in poller

* Fix typing for return values
2022-02-08 12:17:05 -06:00
jjlawren b02a030336
Fix Spotify, Tidal, Apple Music playback on Sonos groups (#65838) 2022-02-06 18:37:23 +01:00
jjlawren e17f1ea577
Support Plex in Sonos media browser (#64951)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-01-26 10:40:47 -08:00
jjlawren cdad1a9f27
Use local Sonos API for Plex music playback (#63357) 2022-01-25 21:10:11 -08:00
Paulus Schoutsen a371f8f788
Allow browsing the Spotify media player in Sonos (#64921) 2022-01-25 12:43:43 -08:00
jjlawren a046cef734
Bump soco to 0.26.0 (#64819) 2022-01-24 14:54:27 +01:00
Paulus Schoutsen ed2e1f431c
Allow Sonos to browse and play local media via media browser (#64603) 2022-01-21 13:49:06 -08:00
Paulus Schoutsen 2f18058fe7
Allow browsing favorites in Sonos media browser (#64082)
* Allow browsing favorites in Sonos media browser

* Group favorites by type, add thumbnails

* Update homeassistant/components/sonos/media_player.py

* Apply suggestions from code review

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

* Keep favorite groups ordering consistent

* Skip root folder if only one child available

Co-authored-by: Jason Lawrence <jjlawren@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-14 09:28:25 -08:00
epenet ed5e1af10a
Add type hints to media_player (part 2) (#64006) 2022-01-13 10:43:52 +01:00
jjlawren 754f4c52c2
Support media_player grouping services for Sonos (#63256) 2022-01-05 16:22:36 +01:00
jjlawren 4475e88707
Fix Sonos updating when entities are disabled (#62456)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-12-21 20:36:12 -08:00
jjlawren 171b57bf32
Use _attrs where possible in Sonos (#60931) 2021-12-03 10:57:19 -08:00
jjlawren a88cc8b98c
Move Sonos bass & treble controls to number entities (#60498) 2021-11-29 16:00:37 +01:00
Marc Mueller 4c68662612
Use assignment expressions 34 (#58823) 2021-10-31 19:01:16 +01:00
jjlawren 084fd2d19f
Expose Sonos features as switch entities (#54502)
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-10-23 23:11:27 +02:00
Robert Hillis 98c8782c2b
Fix sonos alarm schema (#55318) 2021-08-27 09:25:40 -07:00
Ben Edmunds b167e05a56
Sonos add bass & treble EQ option (#53978) 2021-08-25 17:42:40 +02:00
jjlawren 88cffc86bb
Add crossfade control support to Sonos (#53228) 2021-07-26 21:58:13 +02:00
Anders Melchiorsen e85b0ec052
Move Sonos to upstream SoCo (#53351) 2021-07-23 00:40:30 +02:00
jjlawren d3724355cf
Improve Sonos Spotify/Tidal support, add service exceptions (#51871) 2021-06-17 11:09:57 +02:00
jjlawren 31db3fcb23
Refactor Sonos alarms and favorites into system-level coordinators (#51757)
* Refactor alarms and favorites into household-level coordinators

Create SonosHouseholdCoodinator class for system-level data
Fix polling for both alarms and favorites
Adjust tests

* Fix docstring

* Review cleanup

* Move exception handling up a level, do not save a failed coordinator

* Apply suggestions from code review

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-16 10:30:05 -05:00
jjlawren d755952148
Set playlist name on playing Sonos media (#51685)
* Use playlist name as media_channel if available

* Use proper playlist attribute
2021-06-13 17:24:46 -05:00
jjlawren 2c9e6bd927
Handle Sonos connection issues better when polling (#51376) 2021-06-02 21:10:27 -07:00
jjlawren 39e62f9c90
Improve Sonos polling (#51170)
* Improve Sonos polling

Warn user if polling is being used
Provide callback IP:port to help user fix networking
Fix radio handling when polling (no event payload)
Clarify dispatch target to reflect polling action

* Lint

* Revert method removal
2021-05-28 12:07:58 +02:00
Anders Melchiorsen fdfb84e8e2
Upgrade pysonos to 0.0.50 (#51125) 2021-05-27 08:13:10 +02:00
Aaron David Schneider 9bf6ea60db
Add Sonos alarm to sonos component (#50719)
* add sonos_alarm

* bug fix for _update_device

* fix pylint and black and co

* small bug fix in speaker.available_alarms

* cleanup and add _LOGGER.debug statements, fix pylint

* fix pylint

* _alarm_id to alarm_id

* fixed rare bug due to raceconditions

* Part 2 of raceconditionfix

* address review suggestions

* readd check for not yet subscribed

* - platforms_ready fix
- add alarmClock to pytest mock

* fixture for ListAlarms

* cleanup mock and match UUID for test

* add simple tests for sonos_alarm

* extend test for attributes

* typhint fix

* typo

* use get_alarms() directly

* refactor available_alarms

* fix attributes

* some cleanup

* change logic of fetch_alarms_for_speaker and rename to update_alarms_for_speaker

* update_alarms_for_speaker is now a method

* Update homeassistant/components/sonos/switch.py

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>

* Update homeassistant/components/sonos/speaker.py

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2021-05-25 11:32:25 -05:00
mountainsandcode 2d29959a52
Add control of hardware buttons to Sonos (#49977) 2021-05-17 11:12:01 +02:00