Commit graph

49 commits

Author SHA1 Message Date
[pʲɵs]
6013584b7b
Add balance entity for Sonos speakers () 2023-04-23 01:18:17 +02:00
jjlawren
1b592e6885
Use subscription callbacks to discover Sonos speakers ()
fixes undefined
2023-01-08 09:50:18 -10:00
Steven Looman
731f618028
Make home assistant discoverable via UPnP/SSDP () 2022-10-15 14:00:46 -04:00
jjlawren
07a46dee39
Additional surround controls for Sonos () 2022-06-22 09:08:31 +02:00
jjlawren
30e71dd96f
Add support for Sonos loudness switch () 2022-05-30 16:09:14 +02:00
jjlawren
1f1932d224
Fix Sonos races related to grouping and startup () 2022-04-28 14:26:29 -07:00
jjlawren
c53aa50093
Rework Sonos discovery & availability () 2022-04-17 22:54:51 -07:00
jjlawren
dbb79e2937
Add support for Sonos subwoofer gain controls () 2022-03-18 10:12:10 -07:00
jjlawren
cfd763db40
Refactor Sonos media metadata handling ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-02-23 08:58:00 -08:00
jjlawren
76149876ab
Enable fallback polling for Sonos microphone binary_sensor () 2022-02-21 19:46:20 +01:00
Joshua Roys
9134e5c844
Get discovered zeroconf IPv6 addresses () 2022-02-11 16:46:17 -06:00
jjlawren
4d944e35fd
Skip polling Sonos audio input sensor when idle () 2022-02-10 12:48:13 -08:00
jjlawren
a7982adc73
Discard duplicate sonos events ()
* Throttle duplicate Sonos events

* Fix test by breaking reference
2022-01-23 00:40:08 +01:00
jjlawren
e7f0962979
Improve Sonos diagnostics () 2022-01-20 13:14:08 -10:00
jjlawren
740a8c33ee
Add audio_delay number entity to Sonos () 2022-01-10 16:04:40 +01:00
jjlawren
8a8ffa1c08
Add support for Sonos microphone binary_sensor ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-01-04 18:45:40 +01:00
jjlawren
00307e1ade
Bump soco to 0.25.2 () 2021-12-23 11:07:29 -08:00
jjlawren
9f3a4c3617
Improve Sonos tests, begin adding coverage ()
* Update entity registry handling

* Add and use fixtures to test setup via config entry

* Remove legacy redundant tests

* Remove unnecessary mock_coro

* Remove unnecessary namespace change

* Move zeroconf payload to fixture

* Begin adding Sonos to codecov

* Mock proper return value

* Revert return value for platform
2021-12-08 19:28:27 +01:00
jjlawren
cbf2bf2e1f
Add audio input format sensor to Sonos HT devices () 2021-12-03 10:06:56 -08:00
jjlawren
b883014ed4
Add Sonos subwoofer and surround on/off controls () 2021-12-03 16:05:40 +01:00
J. Nick Koston
8e0ef52cc8
Ensure sonos ssdp callbacks use dataclass methods () 2021-12-02 09:53:08 -08:00
jjlawren
a88cc8b98c
Move Sonos bass & treble controls to number entities () 2021-11-29 16:00:37 +01:00
jjlawren
81e02a39df
Ignore non-Sonos SSDP devices with Sonos-like identifiers () 2021-11-19 10:14:12 -06:00
jjlawren
0d6aa89fd4
Refactor Sonos alarms and favorites updating () 2021-09-28 09:49:32 +02:00
Michael Chisholm
805e73f78c
Add UPNP device connection for Sonos () 2021-09-27 17:36:47 +02:00
Erik Montnemery
be0819b456
Mock out network.util.async_get_source_ip in tests () 2021-09-17 21:40:58 -10:00
Steven Looman
73260c5b88
Move parts of ssdp to async_upnp_client ()
* Move parts of ssdp to async_upnp_client

* Fix test for environments with multiple sources

* Fix sonos tests

* More fixes/changes

* More fixes

* Use async_upnp_client==0.21.0

* Pylint/test fixes

* More changes after review

* Fix tests

* Improve testing

* Fix mypy

* Fix yamaha_musiccast tests?

* Changes after review

* Pylint

* Reduce calls to combined_headers

* Update to async_upnp_client==0.21.1

* Update to async_upnp_client==0.21.2

* use as_dict

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-11 13:38:16 -10:00
Anders Melchiorsen
e85b0ec052
Move Sonos to upstream SoCo () 2021-07-23 00:40:30 +02:00
jjlawren
e5309e89ea
Skip processed Sonos alarm updates ()
* Skip processed Sonos alarm updates

* Fix bad conflict merge
2021-05-30 21:03:53 -07:00
J. Nick Koston
c5e5787e1d
Replace sonos discovery thread with ssdp callback registration ()
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2021-05-29 08:31:22 -05:00
jjlawren
84f0d3f961
Centralize Sonos subscription logic ()
* Centralize Sonos subscription logic

* Clean up mocked Sonos Service instances, use subscription callback

* Use existing mocked attributes

* Use event dispatcher dict, move methods together, make update_alarms sync

* Create dispatcher dict once
2021-05-28 21:32:50 -05:00
Aaron David Schneider
f7f8672eea
Add tests for sonos switch platform ()
* add tests

* refactor async_added_to_hass

* fix tests and race condition

* use async_get

* typo
2021-05-27 19:56:59 +02:00
jjlawren
1e86818f85
Add battery support for Sonos S1 speakers () 2021-05-25 18:39:31 +02:00
Aaron David Schneider
9bf6ea60db
Add Sonos alarm to sonos component ()
* 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
jjlawren
29205a9239
Sonos use common firmware version () 2021-05-23 08:43:49 -05:00
jjlawren
3be8c9c1c0
Add battery support for Sonos speakers ()
Co-authored-by: Walter Huf <hufman@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-04-25 07:20:21 -10:00
J. Nick Koston
6dc1414b69
Fix sonos volume always showing 0 () 2021-04-04 20:26:55 -07:00
J. Nick Koston
bc06100dd8
Make sonos event asyncio () 2021-04-03 17:10:48 -07:00
jjlawren
1f66457a34
Separate Plex/Sonos cross-integration tests () 2021-01-21 11:22:19 +01:00
jjlawren
411cc6542c
Move Plex->Sonos playback to built-in service ()
* Move Plex->Sonos playback service from integration to platform

* Test against 'native' Plex media_players

* Add Plex to Sonos after_dependencies

* Remove circular dependency

* Raise exceptions in failed service calls

* Add test to forward service call from Sonos

* Additional Sonos->Plex tests

* Fix docstring
2021-01-13 15:24:44 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Anders Melchiorsen
30b454ddb7
Fix Sonos shuffle/repeat state with Spotify Connect () 2020-10-17 09:40:43 +02:00
J. Nick Koston
03b14c9aae
Add sw_version and connections to sonos devices () 2020-05-17 16:16:50 -05:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 () 2020-04-30 13:29:50 -07:00
Paulus Schoutsen
8d2086d076
Sonos services to work without admin access () 2020-02-05 15:50:20 -08:00
Michał Mrozek
bfba46d64a move imports in sonos component () 2019-10-19 23:52:42 +02:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Anders Melchiorsen
0ecf152153 Continuous discovery of Sonos speakers () 2019-04-29 10:20:09 +02:00
Anders Melchiorsen
5dbf58d67f
Remove support for deprecated Sonos configuration () 2019-04-26 08:56:43 +02:00