Commit graph

91 commits

Author SHA1 Message Date
G Johansson
0fd9327c46
Revert "Sonos add yaml config issue" (#99379)
Revert "Sonos add yaml config issue (#97365)"

This reverts commit 2299430dbe.
2023-08-31 10:24:03 +02:00
G Johansson
2299430dbe
Sonos add yaml config issue (#97365) 2023-07-27 23:33:49 +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
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
J. Nick Koston
905a0f2eb6
Fix sonos blocking I/O in the event loop (#88554) 2023-02-21 13:54:08 -06:00
jjlawren
beaa36c36e
Guard against duplicate Sonos discoveries (#88305) 2023-02-18 10:41:25 +01:00
Paulus Schoutsen
3a32d2bdcb
Add background tasks to config entries (#88335)
* Use a set for config entries task tracking

* Allow adding background tasks to config entries

* Add tests for config entry add tasks

* Update docstrings on core create task

* Migrate roon and august

* Use in more places

* Guard for None
2023-02-17 13:50:05 -05:00
Paulus Schoutsen
baee6b1f5e
Fix dangling task for sonos (#88298) 2023-02-16 23:07:35 -05:00
jjlawren
a8b7a32578
Handle failed Sonos subscriptions better (#87240)
Catch unsubscribe failure separately from ZGS poll
2023-02-02 23:42:36 -05:00
Marc Mueller
6397138589
Update Optional typing (1) [Py310] (#86417)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-23 09:56:10 +01:00
jjlawren
9d7e99eeb7
Handle timeouts in Sonos, reduce logging noise (#85461) 2023-01-08 13:39:26 -10:00
jjlawren
90e55cd711
Bump soco to 0.29.0 (#85473) 2023-01-09 00:52:22 +02:00
jjlawren
1b592e6885
Use subscription callbacks to discover Sonos speakers (#85411)
fixes undefined
2023-01-08 09:50:18 -10:00
Franck Nijhof
f39f3b612a
String formatting and max line length - Part 5 (#84501)
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2022-12-23 16:43:17 +01:00
Robert Hillis
73ba7a989b
Make Sonos typing more complete (#68072) 2022-09-05 13:12:37 -05:00
jjlawren
bbdce93291
Fix error on shutdown when no Sonos devices available (#75798) 2022-07-27 10:01:44 +02:00
J. Nick Koston
cd03c49fc2
Wait for config entry platform forwards (#73806) 2022-07-09 17:27:42 +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
8d66623036
Add ZoneGroupState statistics to Sonos diagnostics (#73848) 2022-06-22 12:29:34 -05:00
jjlawren
90e402eca5
Allow removing Sonos devices (#73567) 2022-06-15 19:21:39 -10:00
jjlawren
e339f43322
Add a timeout during Sonos speaker setup (#71973) 2022-05-16 18:03:39 -05:00
jjlawren
532b3d780f
Rework Sonos battery and ping activity tracking (#70942) 2022-05-14 13:40:26 -05:00
jjlawren
c53aa50093
Rework Sonos discovery & availability (#70066) 2022-04-17 22:54:51 -07:00
Marc Mueller
53245c6523
Update pylint to 2.13.0 (#68656) 2022-03-25 15:14:48 -07:00
jjlawren
a4ba71408b
Adjust Sonos visibility checks (#67196) 2022-02-25 08:27:06 -08:00
jjlawren
47af256610
Schedule activity checks when using manual hosts (#65970) 2022-02-09 16:55:00 -06: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
40857bda90
Use SSDP byebye to mark Sonos as offline (#65686) 2022-02-04 11:41:24 -08:00
jjlawren
2129972904
Add activity statistics to Sonos diagnostics (#65214) 2022-01-30 13:15:51 -08:00
jjlawren
ec88897d04
Add event statistics to Sonos diagnostics (#64845) 2022-01-24 22:52:40 -10:00
jjlawren
754f4c52c2
Support media_player grouping services for Sonos (#63256) 2022-01-05 16:22:36 +01:00
epenet
e01b0a3625
Add setup type hints to sonos, unifi and wake_on_lan (#62876)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-27 23:42:24 +01:00
J. Nick Koston
8e0ef52cc8
Ensure sonos ssdp callbacks use dataclass methods (#60782) 2021-12-02 09:53:08 -08:00
jjlawren
e56a676fd5
Import helpers in Sonos instead of accessing hass (#60848) 2021-12-02 18:21:49 +01:00
jjlawren
aa5cf175f4
Set Sonos availability based on activity and discovery (#59994) 2021-11-21 18:48:57 -06:00
jjlawren
81e02a39df
Ignore non-Sonos SSDP devices with Sonos-like identifiers (#59809) 2021-11-19 10:14:12 -06:00
Marc Mueller
9561c51276
Use assignment expressions 16 (#57962) 2021-10-18 19:36:35 -07:00
J. Nick Koston
0363c22dd8
Fix Sonos going offline with 13.3 firmware (#56590) 2021-09-23 20:39:20 -07:00
Steven Looman
73260c5b88
Move parts of ssdp to async_upnp_client (#55540)
* 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
jjlawren
87e0b14282
Log gathered exceptions during Sonos unsubscriptions (#54190) 2021-08-12 11:46:07 -05:00
jjlawren
1eeb12ba1c
Support unloading/reloading Sonos (#54418) 2021-08-10 10:57:39 -07:00
jjlawren
214920f486
Ignore Sonos Boost devices during discovery v2 (#53358) 2021-07-27 09:50:46 -05:00
Anders Melchiorsen
e85b0ec052
Move Sonos to upstream SoCo (#53351) 2021-07-23 00:40:30 +02:00
jjlawren
a2fbc4218d
Cleanup regroup handling in Sonos (#53241)
Check event before creating coroutine
Remove unnecessary regrouping dispatcher
Update typing to reflect actual behavior
Add optimizations for polling mode
2021-07-20 20:21:48 +02:00
Marc Mueller
f6b162bc39
Add pylint CodeStyle extension (#53147) 2021-07-19 06:57:06 -07:00
Ville Skyttä
470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes (#52987) 2021-07-19 10:46:09 +02:00
jjlawren
0277a645f1
Log source of discovery in Sonos (#53101) 2021-07-16 11:12:01 -10:00
J. Nick Koston
98109caee9
Add zeroconf discovery to Sonos (#52655) 2021-07-12 18:24:12 +02:00