Commit Graph

80 Commits

Author SHA1 Message Date
Louis Christ
4cecb6c851 Replace custom actions for sleep timer with buttons in bluesound integration (#133604)
* Use entity services

* Add buttons for sleep timer

* Fix merge

* Replace hass.data with runtime_data from config_entries

* Disable button by default

* Remove duplicate dispatchers

* Add tests for buttons

* Fix merge commit

* Fix merge commit

* Update deprecation version

* Remove update_before_add

* Use entity_registry_enabled_by_default

* Use EnitiyDescriptions for buttons

* Update version for deprecate

* Use tranlation_key; Move default disable to EntityDescription

* Fix merge commit

* Fix callback type; fix breaks version

* Use normal issue

* Apply suggestions from code review

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-05-09 16:15:52 +02:00
Louis Christ
7de5646d6b Bump pyblu to 2.0.1 (#143178) 2025-04-19 10:41:50 +02:00
Louis Christ
32ee31b8c7 Use saved volume when selecting preset in bluesound integration (#141079)
* Use load_preset to select preset as source

* Add tests

* Fix

---------

Co-authored-by: Joostlek <joostlek@outlook.com>
2025-04-01 14:41:24 +02:00
Erik Montnemery
f83c8de8d3 Update signature of platforms' async_setup_entry (#138201) 2025-02-10 21:08:03 +01:00
epenet
3472e0e370 Standardize homeassistant imports in component (a-b) (#136821) 2025-01-29 11:37:48 +01:00
Louis Christ
acbd501ede Add DataUpdateCoordinator to bluesound integration (#135125) 2025-01-08 22:09:59 +01:00
G Johansson
9532e98166 Remove deprecated config entry import from bluesound (#134926) 2025-01-06 22:58:29 +01:00
Louis Christ
9c26654db7 Use entity services in bluesound integration (#129266) 2024-12-17 20:44:38 +01:00
Louis Christ
96eae1221c Fix bluesound_group attribute in bluesound integration (#130815)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-11-27 09:40:20 +01:00
Louis Christ
a7be76ba0a Fix volume_up not working in some cases in bluesound integration (#130146) 2024-11-08 18:40:43 +01:00
Louis Christ
2c1db10986 Map "stop" to MediaPlayerState.IDLE in bluesound integration (#129904)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-11-06 13:10:23 +01:00
epenet
daf0939f09 Move bluesound service registration to separate module (#129086) 2024-10-25 11:27:25 +02:00
Louis Christ
93e6c9e5a0 Add tests for media_player to bluesound integration (#125864) 2024-10-24 15:42:25 +02:00
Louis Christ
8bf7243549 Bump pyblu to 1.0.4 (#128482) 2024-10-16 18:59:03 +02:00
Louis Christ
0582c39d33 Remove call to removed function in bluesound integration (#125779)
* Remove async_trigger_sync_on_all

* Use cast instead of instanceof
2024-09-11 23:14:43 +02:00
Louis Christ
5852917a10 Replace Throttle in bluesound integration (#124943)
* Replace Throttle with throttled and long-polling

* Remove custom throttled
2024-09-10 16:43:10 +02:00
Louis Christ
7868ffac35 Enable strict typing checking for bluesound integration (#123821)
* Enable strict typing

* Fix types

* Update to pyblu 0.5.2 for typing support

* Update pyblu to 1.0.0

* Update pyblu to 1.0.1

* Update error handling

* Fix tests

* Remove return None from methods only returning None
2024-08-30 20:21:27 +02:00
Louis Christ
f394dfb8d0 Handle CancelledError in bluesound integration (#124873)
Catch CancledError in async_will_remove_from_hass
2024-08-30 11:38:07 +02:00
Louis Christ
30994710e6 Fix status update loop in bluesound integration (#123790)
* Fix retry loop for status update

* Use 'available' instead of _is_online

* Fix tests
2024-08-13 12:55:01 +02:00
Louis Christ
86c4ded4cd Fix startup blocked by bluesound integration (#123483) 2024-08-09 19:36:58 +02:00
Louis Christ
02f81ec481 Fix wrong DeviceInfo in bluesound integration (#123101)
Fix bluesound device info
2024-08-03 22:32:47 +02:00
Louis Christ
ae9e8ca419 Simplify async_setup_entry in bluesound integration (#122874)
* Use async_added_to_hass and async_will_remove_from_hass

* Remove self._hass
2024-07-31 19:04:17 +02:00
Louis Christ
9450744b3b Add device _info to bluesound integration (#122795)
* Add device_info

* Use _attr_unique_id instead of custom methode

* Use different DeviceInfo if port is not DEFAULT_PORT

* Remove name method; Add has_entity_name=True

* Remove self._name completely

* move _attr_has_entity_name and _attr_name out of __init__

* log error if status update fails

* use error for remaining info logs
2024-07-29 23:11:51 +02:00
Louis Christ
f98487ef18 Add config_flow to bluesound integration (#115207)
* Add config flow to bluesound

* update init

* abort flow if connection is not possible

* add to codeowners

* update unique id

* add async_unload_entry

* add import flow

* add device_info

* add zeroconf

* fix errors

* formatting

* use bluos specific zeroconf service type

* implement requested changes

* implement requested changes

* fix test; add more tests

* use AsyncMock assert functions

* fix potential naming collision

* move setup_services back to media_player.py

* implement requested changes

* add port to zeroconf flow

* Fix comments

---------

Co-authored-by: Joostlek <joostlek@outlook.com>
2024-07-28 20:48:20 +02:00
Louis Christ
f629364dc4 Use pyblu library in bluesound (#117257)
* Integrate pypi libraray: pyblu

* Raise PlatformNotReady if _sync_status is not available yet

* Revert "Raise PlatformNotReady if _sync_status is not available yet"

This reverts commit a649a6bccd00cf16f80e40dc169ca8797ed3b6b2.

* Replace 'async with timeout' with parameter in library

* Set timeout back to 10 seconds

* ruff fixes

* Update homeassistant/components/bluesound/media_player.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-07-21 12:24:54 +02:00
epenet
36d8ffa79a Force alias when importing media player PLATFORM_SCHEMA (#120537) 2024-06-26 12:19:04 +02:00
Marc Mueller
3937cc2963 Improve SERVICE_TO_METHOD typing (#120474) 2024-06-26 02:20:48 +02:00
Sid
c2b3bf3fb9 Enable Ruff RET502 (#115139) 2024-05-21 22:19:33 +02:00
Sid
b37f7b1ff0 Enable Ruff RUF019 (#115396)
* Enable Ruff RUF019

* fix tado tests

* review comments
2024-04-24 07:23:24 +02:00
Sid
0d66d298ec Enable Ruff RET504 (#114528)
* Enable Ruff RET504

* fix test

* Use noqa instead of cast

* fix sonos RET504

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
Sid
82a60fe8ad Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Joost Lekkerkerker
23ffcaf187 Improve lists in integrations [B] (#113069) 2024-03-11 18:59:57 +01:00
Marc Mueller
ff3a801936 Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00
Marc Mueller
c82933175d Use builtin TimeoutError [a-d] (#109678) 2024-02-05 11:31:33 +01:00
Erik Montnemery
1909163c8e Revert "Set volume_step in bluesound media_player" (#106582)
Revert "Set volume_step in bluesound media_player (#105672)"

This reverts commit 7fa55ffdd2.
2023-12-28 19:54:51 +01:00
Erik Montnemery
7fa55ffdd2 Set volume_step in bluesound media_player (#105672) 2023-12-15 00:10:31 +01:00
J. Nick Koston
262483f3f6 Replace async_timeout with asyncio.timeout A-B (#98415) 2023-08-15 10:29:28 +02:00
Franck Nijhof
86708b5590 Update ruff to v0.0.280 (#97102) 2023-07-23 22:00:26 +02:00
Franck Nijhof
5e81d28116 Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
epenet
6f05a74686 Enforce MediaPlayerEntityFeature (#82462) 2022-11-22 07:15:37 +01:00
epenet
18e30e7c06 Adjust type hints for MediaPlayerEntityFeature (#82258) 2022-11-17 13:58:34 +01:00
Fredrik Erlandsson
09eff3c242 Add Bluesound unique id (#80559)
* add unique_id & device_info

* remove broken image

* use a combination of mac and port (for multizone devices)

* use the typed dataclass

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>

* Don't use get

* fix device_info

* remove device_info

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>
2022-10-21 12:27:31 +02:00
epenet
2cc45cd302 Use new media player enums in bluesound (#78096) 2022-09-15 11:00:55 +02:00
epenet
9a5fe950a4 Use new media player enums [a-d] (#77939) 2022-09-08 11:03:10 +02:00
epenet
dedf063e43 Improve entity type hints [b] (#77012) 2022-08-19 09:54:13 +02: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
epenet
8af37235ec Use EntityFeature enum in components (b**) (#69336) 2022-04-05 23:53:45 +02:00
Paulus Schoutsen
12a7b64e64 Add media source support to bluesound (#67563) 2022-03-04 14:51:42 +01:00
epenet
bf78ddcadb Add media_player setup type hints [a-l] (#63297)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 16:04:15 +01:00