Commit graph

495 commits

Author SHA1 Message Date
jjlawren
27f3b53872
Support Sonos announcements using websockets (#91145) 2023-04-13 20:08:53 -10: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
J. Nick Koston
44eaf70625
Make sonos activity check a background task (#90553)
Ensures the task is canceled at shutdown if the device
is offline and the ping is still in progress
2023-03-31 14:33:44 -04:00
epenet
3b83340f6e
Improve get_browse_image type hints in media player (#90057) 2023-03-26 19:54:01 +02:00
epenet
f56bf134d2
Improve browse_media type hints in media player (#90060)
* Improve browse_media type hints in media player

* Adjust components

* Adjust base entity
2023-03-24 21:49:12 -07: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
epenet
4836404288
Improve media_player type hints in integrations (#90029)
Fix some media_player type hints
2023-03-21 11:10:12 +01:00
epenet
b3d6f098d2
Adjust entity registry access in integrations (1) (#88946) 2023-03-01 08:02:34 +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
496ab49d80
Bump SoCo to 0.29.1 (#88410)
Bump soco to 0.29.1
2023-02-18 15:02:03 -05: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
jjlawren
b51836a57b
Detect when battery-powered Sonos devices are turned off (#87606) 2023-02-17 19:13:22 +01:00
Paulus Schoutsen
baee6b1f5e
Fix dangling task for sonos (#88298) 2023-02-16 23:07:35 -05:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Erik Montnemery
23fa500406
Sort manifests 9 (#87030) 2023-02-08 20:22:30 +01:00
Marc Mueller
b478b4fa16
Add ParamSpec TypeAliases [mypy 1.0] (#87597) 2023-02-07 15:56:26 +01:00
Franck Nijhof
939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
Franck Nijhof
3d557b5583
Collection of code styling tweaks (#87381) 2023-02-04 12:52:26 -05:00
Franck Nijhof
ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
jjlawren
a8b7a32578
Handle failed Sonos subscriptions better (#87240)
Catch unsubscribe failure separately from ZGS poll
2023-02-02 23:42:36 -05:00
Franck Nijhof
5e81d28116
Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01: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
Marc Mueller
45b4b0e990
Import ParamSpec from typing [Py310] (#86413)
* Import ParamSpec from typing [Py310]

* Update additional imports
2023-01-23 07:28:43 +01:00
Michel van de Wetering
b087c1e734
Set deviceclass to speaker for Sonos media_player (#80694) 2023-01-16 20:20:37 +01:00
Ville Skyttä
ae302bbec0
Make use of str.removeprefix and .removesuffix (#85584) 2023-01-13 12:19:38 +01:00
epenet
fa7d7415d7
Adjust diagnostic return type in Sonos (#85585) 2023-01-10 12:07:14 +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
GitHub Action
cc27986cac [ci skip] Translation update 2022-12-28 00:22:40 +00: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
Michaël Arnauts
7142b4ecac
Fixes some grammar mistakes (#84283) 2022-12-20 11:10:31 +01:00
GitHub Action
1f3e5fb4fc [ci skip] Translation update 2022-12-07 00:24:08 +00:00
jjlawren
c70388869b
Do not discard zero positions for Sonos media players (#83249)
fixes undefined
2022-12-04 21:11:30 -05:00
GitHub Action
230b50d099 [ci skip] Translation update 2022-11-29 00:26:01 +00:00
jjlawren
f887aeedfe
Fix Sonos alarm 'scheduled_today' attribute logic (#82816)
fixes undefined
2022-11-28 15:31:32 +01:00
GitHub Action
eaf6d43508 [ci skip] Translation update 2022-11-23 00:26:26 +00:00
GitHub Action
c7fc51cfa5 [ci skip] Translation update 2022-11-04 00:29:52 +00:00
jjlawren
d50f5e49c8
Extend Sonos queue operation timeouts (#80804) 2022-10-25 13:38:28 +02:00
jjlawren
4837e22262
Bump soco to 0.28.1 (#80792) 2022-10-22 19:59:44 -05:00
jjlawren
5694a4bfc8
Fix state updating for crossfade switch on Sonos (#79776) 2022-10-07 06:29:34 +02:00
Marek Skrobacki
3f512e38db
Fix Sonos cover art when browsing albums (#75105) 2022-09-21 04:03:10 +08:00
Marc Mueller
b9d34ce169
Improve sonos typing (#78661) 2022-09-19 09:59:12 +02:00
epenet
5c8e8e4860
Use new media player enums (#78264) 2022-09-12 20:06:27 +02:00
epenet
7871a517a8
Import constants from root (#78271) 2022-09-12 18:53:05 +02:00
uvjustin
9b2d17cd00
Escape media_content_id in media player proxy (#77811)
* Escape media_content_id in media player proxy

* Change usage in kodi

* Change usage in roku

* Change usage in sonos

* Add test

* Add comment

* Change path regex instead of double quoting

* Use .+ instead of .*
2022-09-09 13:18:24 +02:00
epenet
6b157921ea
Use new media player enums [s] (#78064) 2022-09-08 23:05:10 +02:00
epenet
3ec231c911
Improve entity type hints [s] (part 2/2) (#77882) 2022-09-06 13:36:44 +02:00
Robert Hillis
73ba7a989b
Make Sonos typing more complete (#68072) 2022-09-05 13:12:37 -05:00