Commit graph

577 commits

Author SHA1 Message Date
J. Nick Koston
26079a6eaf
Use eager_start for sonos ping background task (#111578) 2024-02-26 16:31:06 -10:00
J. Nick Koston
4ea1c5cc3c
Add support for importing integrations in the executor (#111336)
* Add support for pre-imports at setup time

alternative solution to #111331

* refactor

* refactor

* refactor

* mark >1.0s integrations

* no point in executor if already loaded

* no point in executor if already loaded

* cleanup

* cleanup

* two more

* one more

* analytics loads a lot more integrations

* cloud

* debug

* psutil, hardwre

* try zha

* Update homeassistant/setup.py

* await

* comments

* coverage

* coverage

* coverage

* move logic to loader

* move logic to loader

* preserve comments
2024-02-26 14:49:43 -05:00
Marc Mueller
438d3b01b9
Use builtin TimeoutError [o-s] (#109682) 2024-02-05 12:14:37 +01:00
jjlawren
68797feac5
Do not suggest area for portable Sonos speakers (#109350)
* Do not suggest area for portable speakers

* Update tests

* Improve readability, update tests
2024-02-03 09:20:10 +01:00
jjlawren
c4fd45ef97
Bump SoCo to 0.30.2 (#108033) 2024-01-14 14:19:36 -05:00
jjlawren
0bdbb52694
Bump sonos-websocket to 0.1.3 (#107765) 2024-01-10 18:00:34 -10:00
jjlawren
ad199aaba2
Cleanup Sonos subscription used during setup (#106575) 2023-12-28 21:08:55 +01:00
Erik Montnemery
fb280229c2
Revert "Set volume_step in sonos media_player" (#106581)
Revert "Set volume_step in sonos media_player (#105671)"

This reverts commit 6dc8c2c370.
2023-12-28 19:48:34 +01:00
jjlawren
0ae4d017b9
Add subwoofer crossover support to Sonos Amp devices (#106290) 2023-12-23 10:25:20 +01:00
Ville Skyttä
24b1e01d71
Update Ruff to 0.1.8, avoid linter/formatter conflicts (#106080)
* Disable Ruff rules that may conflict with the formatter

* Upgrade Ruff to 0.1.8

- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8

* Format with Ruff 0.1.8
2023-12-20 23:55:09 +01:00
jjlawren
9c134c6b51
Bump soco to 0.30.0 (#105823) 2023-12-16 08:06:04 +01:00
Erik Montnemery
6dc8c2c370
Set volume_step in sonos media_player (#105671) 2023-12-13 19:40:51 +01:00
Aarni Koskela
706add4a57
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Marco4223
a187164bf8
Get all playlist items from sonos devices (#100924) 2023-10-20 15:18:10 +02:00
Tobias Sauerwein
3c5772c1c6
Remove myself as codeowner for sonos and kodi (#101662) 2023-10-08 17:01:00 +02:00
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
Marc Mueller
8b0fdd6fd2
Use asyncio.timeout [s-z] (#98452) 2023-08-15 14:34:18 +02:00
Erik Montnemery
045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
G Johansson
2299430dbe
Sonos add yaml config issue (#97365) 2023-07-27 23:33:49 +02:00
Joost Lekkerkerker
81ce6e4797
Add entity translations to Sonos (#96167)
* Add entity translations to Sonos

* Add entity translations to Sonos

* Add entity translations to Sonos

* Add entity translations to Sonos
2023-07-15 00:36:26 +02:00
Paulus Schoutsen
7859be6481
Add deduplicate translations script (#96384)
* Add deduplicate script

* Fix forecast_solar incorrect key with space

* Fix utf-8

* Do not create references to other arbitrary other integrations

* Add commented code to only allow applying to referencing integrations

* Tweak

* Bug fix

* Add command line arg for limit reference

* never suggest to update common keys

* Output of script

* Apply suggestions from code review

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-07-13 11:52:50 -04:00
Franck Nijhof
62fe4957c9
Migrate integration services (Q-S) to support translations (#96378) 2023-07-12 01:18:22 +02:00
Erik Montnemery
87f284c7e9
Add MEDIA_ANNOUNCE to MediaPlayerEntityFeature (#95906) 2023-07-10 12:58:53 +02:00
Erik Montnemery
6dae3553f2
Add MEDIA_ENQUEUE to MediaPlayerEntityFeature (#95905) 2023-07-08 10:55:25 +02:00
Paulus Schoutsen
9cace8e4bd
Fix some entity naming (#95562) 2023-06-29 13:11:17 -04: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
abf08f66a4
Bump sonos-websocket to 0.1.2 (#93429)
Bump sonos-websocket to 0.1.2
2023-05-24 08:38:16 +02:00
jjlawren
04c298b772
Bump sonos-websocket to 0.1.1 (#92834) 2023-05-09 07:58:56 +02:00
jjlawren
65837c9075
Bump sonos-websocket to 0.1.0 (#92209)
Bump sonos-websocket to 0.1.0
2023-04-28 16:10:48 -05:00
jjlawren
4ce1106243
Properly resolve media_source URLs for Sonos announcements (#92154)
Properly resolve media_source URLs for Sonos announcements
2023-04-27 23:51:51 -04:00
[pʲɵs]
6013584b7b
Add balance entity for Sonos speakers (#85205) 2023-04-23 01:18:17 +02: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
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