Commit Graph

54 Commits (9f586ea547ffad5ce222650b3b895df2cca22e32)

Author SHA1 Message Date
epenet b43379be7d
Standardize `helpers.xxx_registry` imports (#136688)
Standardize registry imports
2025-01-28 08:48:34 +01:00
epenet b046ca9abe
Move ZeroconfServiceInfo to service_info helpers (#135653)
* Move ZeroconfServiceInfo to service_info helpers

* Adjust deprecation date

* Fix mypy/pylint

* Fix DeprecatedConstant

* Add deprecation test

* Adjust

* Also deprecate ATTR_PROPERTIES_ID
2025-01-15 12:25:42 +01:00
Markus Jacobsen 2054988790
Add Bang & Olufsen button Event entities (#127550)
* Add button events

* Remove unused common keys
Rename Preset to Favourite

* Add event testing

* Add check for Beoconnect Core

* Rename device controls

* Add test for Beoconnect core event entity creation

* Fix config entry type

* Add a type checking check before assertion

* Add icon translations

* Remove useless defined icons

* Remove base event class

* Update homeassistant/components/bang_olufsen/event.py

Co-authored-by: Josef Zweck <josef@zweck.dev>

---------

Co-authored-by: Josef Zweck <josef@zweck.dev>
2024-12-31 21:55:24 +01:00
Marc Mueller 0e8961276f
Enable pydantic.v1 mypy plugin (#132907) 2024-12-11 10:50:42 +01:00
J. Nick Koston d2303eb83f
Bump pydantic to 2.10.3 and update required deps (#131963) 2024-12-10 18:27:40 +01:00
Markus Jacobsen dba405dd88
Bump mozart-api to 4.1.1.116.4 (#132859)
Bump API
2024-12-10 19:21:59 +02:00
Markus Jacobsen d4546c94b0
Add beolink_join source_id parameter to Bang & Olufsen (#132377)
* Add source as parameter to beolink join service

* Add beolink join source and responses

* Improve comment
Add translation

* Remove result from beolink join custom action

* Cleanup

* Use options selector instead of string for source ID
Fix test docstring

* Update options

* Use translation dict for source ids
Add input validation
Add tests for invalid sources
Improve source id description

* Use list instead of translation dict
Remove platform prefixes
Add test for Beolink Converter source

* Fix source_id naming and order
2024-12-10 11:01:12 -06:00
Markus Jacobsen a97eeaf189
Add Bang & Olufsen diagnostics (#131538)
* Add diagnostics

* Add tests for diagnostics

* Add media_player diagnostics

* Use media_player entity's state instead of registryentry

* Update tests

* Reorganize code
Remove context from media_player state

* Fix dict being read only
Simplify naming
Update test snapshot

* Update test snapshot
2024-11-26 20:56:36 -05:00
Markus Jacobsen f04c50c59e
Fix Bang & Olufsen WebSocket debug log and test (#131671)
* Fix test and debug message

* Reorder dict order
2024-11-26 20:48:46 -05:00
Markus Jacobsen f5b2f9dcbf
Add parallel updates setting to Bang & Olufsen (#131526) 2024-11-26 09:23:23 +01:00
Markus Jacobsen ad19c5f9c1
Remove Bang & Olufsen static icon (#131528) 2024-11-26 09:23:08 +01:00
epenet 69cc856d57
Fix incorrect already_configured string in bang olufsen (#131484) 2024-11-25 01:01:35 +01:00
Markus Jacobsen ecb945e08c
Bump mozart-api to 4.1.1.116.3 (#131269) 2024-11-22 20:07:11 +01:00
Markus Jacobsen 31b505828b
Simplify Bang & Olufsen source determination (#130072) 2024-11-09 17:13:07 +01:00
Markus Jacobsen e3dfa84d65
Bang & Olufsen add beolink grouping (#113438)
* Add Beolink custom services
Add support for media player grouping via beolink
Give media player entity name

* Fix progress not being set to None as Beolink listener
Revert naming changes

* Update API
simplify Beolink attributes

* Improve beolink custom services

* Fix Beolink expandable source check
Add unexpand return value
Set entity name on initialization

* Handle entity naming as intended

* Fix "null" Beolink self friendly name

* Add regex service input validation
Add all_discovered to beolink_expand service
Improve beolink_expand response

* Add service icons

* Fix merge
Remove unnecessary assignment

* Remove invalid typing
Update response typing for updated API

* Revert to old typed response dict method
Remove mypy ignore line
Fix jid possibly used before assignment

* Re add debugging logging

* Fix coroutine
Fix formatting

* Remove unnecessary update control

* Make tests pass
Fix remote leader media position bug
Improve remote leader BangOlufsenSource comparison

* Fix naming and add callback decorators

* Move regex service check to variable
Suppress KeyError
Update tests

* Re-add hass running check

* Improve comments, naming and type hinting

* Remove old temporary fix

* Convert logged warning to raised exception for invalid media_player
Simplify code using walrus operator

* Fix test for invalid media_player grouping

* Improve method naming

* Improve _beolink_sources explanation

* Improve _beolink_sources explanation

* Fix tests

* Remove service responses
Fix and add tests

* Change service to action where applicable

* Show playback progress for listeners

* Fix testing

* Remove useless initialization

* Fix allstandby name

* Fix various casts with assertions
Fix comment placement
Fix group leader group_members rebase error
Replace entity_id method call with attribute

* Add syrupy snapshots for Beolink tests, checking entity states
Use test JIDs 3 and 4 instead of 2 and 3 to avoid invalid attributes in testing

* Add sections for fields using Beolink JIDs directly

* Fix typo

* FIx rebase mistake

* Sort actions alphabetically
2024-11-08 12:06:29 +01:00
Markus Jacobsen f6f89bd807
Update Bang & Olufsen source list as availability changes (#129910) 2024-11-06 11:52:00 +01:00
Markus Jacobsen 40b561ea69
Add shuffle media controls to Bang & Olufsen (#129325) 2024-10-28 13:39:49 +01:00
Markus Jacobsen 6c365fffde
Add media seek for sources other than Deezer for Bang & Olufsen (#128661)
* Add seeking for sources other than Deezer

* Add is_seekable attribute to fallback sources and BangOlufsenSource
Add testing

* Update comment

* Use support flags instead of raising errors when seeking on incompatible source
2024-10-25 23:34:39 +02:00
Markus Jacobsen 66ca424d3a
Add repeat media controls to Bang & Olufsen (#128170)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-10-25 20:10:08 +02:00
epenet 5a0e47be48
Use runtime_data in bang_olufsen (#129037) 2024-10-23 18:21:25 +02:00
Markus Jacobsen 9037421a85
Bump mozart-api to 4.1.1.116.0 (#128573)
Bump API
Fix testing
2024-10-17 22:05:28 -04:00
Markus Jacobsen 0fa1478f90
Remove unnecessary dict .keys() calls from Bang & Olufsen (#126762)
Remove useless .keys() calls
2024-09-25 18:19:41 +02:00
Markus Jacobsen bb29c7a02f
Add sound modes to Bang & Olufsen devices (#121209)
* Add sound mode functionality

* Fix naming

* Change unique sound mode symbol

* Add testing for sound modes

* Add test typing

* Use constants for service call parameters

* Add state assertions

* Remove invalid decorator

* Add valid sound mode check

* Add test for invalid sound mode
2024-09-25 15:58:24 +02:00
Markus Jacobsen 113a792734
Fix blocking call in Bang & Olufsen API client initialization (#126456)
* Update API

* Add fix for blocking call to load_default_certs
2024-09-22 23:08:27 +02:00
Markus Jacobsen ba3ba7b890
Bump mozart_api to 3.4.1.8.8 (#126334)
Update API
2024-09-22 16:36:36 +02:00
Markus Jacobsen 20f7490fd9
Remove invalid callback decorator from Bang & Olfusen coroutine functions (#126420)
Remove callback decorator form coroutine functions
2024-09-22 14:19:14 +02:00
Markus Jacobsen a8648b7cdc
Add Bang & Olufsen media_player grouping (#123020)
* Add Beolink custom services
Add support for media player grouping via beolink
Give media player entity name

* Fix progress not being set to None as Beolink listener
Revert naming changes

* Update API
simplify Beolink attributes

* Improve beolink custom services

* Fix Beolink expandable source check
Add unexpand return value
Set entity name on initialization

* Handle entity naming as intended

* Fix "null" Beolink self friendly name

* Add regex service input validation
Add all_discovered to beolink_expand service
Improve beolink_expand response

* Add service icons

* Fix merge
Remove unnecessary assignment

* Remove invalid typing
Update response typing for updated API

* Revert to old typed response dict method
Remove mypy ignore line
Fix jid possibly used before assignment

* Re add debugging logging

* Fix coroutine
Fix formatting

* Remove unnecessary update control

* Make tests pass
Fix remote leader media position bug
Improve remote leader BangOlufsenSource comparison

* Fix naming and add callback decorators

* Move regex service check to variable
Suppress KeyError
Update tests

* Re-add hass running check

* Improve comments, naming and type hinting

* Remove old temporary fix

* Convert logged warning to raised exception for invalid media_player
Simplify code using walrus operator

* Fix test for invalid media_player grouping

* Improve method naming

* Improve _beolink_sources explanation

* Improve _beolink_sources explanation

* Add initial media_player grouping

* Convert custom service methods to media_player methods
Fix testing

* Remove beolink JID extra state attribute

* Modify custom services to only work as expected for media_player grouping
Fix tests

* Remove unused dispatch

* Remove wrong comment

* Remove commented out code

* Add config entry mock typing

* Fix beolink listener playback progress
Fix formatting
Add and use get_serial_number_from_jid function

* Fix testing

* Clarify beolink WebSocket notifications

* Further clarify beolink WebSocket notifications

* Convert notification value to enum value

* Improve comments for touch to join

* Fix None being cast to str if leader is not in HA

* Add error messages to devices in Beolink session and not Home Assistant
Rework _get_beolink_jid

* Replace redundant function call

* Show friendly name for unavailable remote leader instead of JID

* Update homeassistant/components/bang_olufsen/media_player.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Remove unneeded typing

* Rework _get_beolink_jid entity check
Clarify invalid entity error message

* Remove redundant "entity" from string

* Fix invalid typing
fix state assertions

* Fix raised error type

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-16 12:16:15 +02:00
Markus Jacobsen 88b95c1236
Remove unneeded check for Bang & Olufsen events and device update (#124363)
Remove unneeded check for device and HomeAssistant availability
2024-08-21 17:03:21 +02:00
Markus Jacobsen f33328308c
Improve Bang & Olufsen notification type comparison (#123067)
* Change notification comparison

* Use try_parse_enum to determine notification type
2024-08-21 11:31:19 +02:00
Terence Honles be7f3ca439
remove unneeded type attributes on WebsocketNotification (#123238) 2024-08-07 10:10:18 +02:00
Markus Jacobsen b0ece4bbaa
Improve Bang olufsen media_player dispatcher formatting (#123065)
* Avoid repeating almost the same command 8 times

* Remove debugging
2024-08-02 17:07:23 +02:00
Markus Jacobsen 20c4f84a4e
Fix incorrect Bang & Olufsen MDNS announcements (#122782) 2024-07-29 22:04:54 +02:00
Markus Jacobsen f801649e9c
Fix Bang & Olufsen wrong source being compared (#121512) 2024-07-08 21:48:07 +02:00
Markus Jacobsen e30f315565
Fix BangOlufsenSource enum member names (#116052) 2024-07-07 23:53:49 +02:00
Markus Jacobsen 510315732a
Add Beoconnect Core as selectable Bang & Olufsen device (#121015)
Add Beoconnect Core as available device
2024-07-02 21:22:22 +01:00
Markus Jacobsen c2dc9e9b67
Simplify Bang & Olufsen media_image_url property (#120951)
Simplify media_image_url property
2024-07-01 20:23:27 +03:00
Markus Jacobsen a29dc4ef1e
Fix Bang & Olufsen jumping volume bar (#120946) 2024-07-01 19:02:43 +02:00
Markus Jacobsen 2146a4729b
Improve Bang & Olufsen error messages (#120587)
* Convert logger messages to raised errors where applicable

* Modify exception types

* Improve deezer / tidal error message

* Update homeassistant/components/bang_olufsen/strings.json

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

* Update homeassistant/components/bang_olufsen/media_player.py

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

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2024-06-26 21:46:59 +02:00
Markus Jacobsen aa8427abe5
Bump Bang & Olufsen mozart-open-api to 3.4.1.8.6 fixing blocking IO call (#120369)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-06-25 08:02:02 +02:00
Markus Jacobsen d0961ca473
Make Bang & Olufsen products ignore .m3u media source files (#120317) 2024-06-24 21:06:57 +02:00
Markus Jacobsen 3046329f4f
Add Tidal play_media support to Bang & Olufsen (#119838)
Add tidal play_media support
2024-06-18 13:00:27 +01:00
Markus Jacobsen 67e9e90346
Bang & Olufsen add overlay/announce play_media functionality (#113434)
* Add overlay service

* Convert custom service to play_media announce

* Remove debugging
2024-06-04 13:48:22 +02:00
Markus Jacobsen cb502263fd
Bang & Olufsen fix straggler from previous PR (#118488)
* Fix callback straggler from previous PR

* Update homeassistant/components/bang_olufsen/media_player.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-05-30 22:23:43 -04:00
Markus Jacobsen 12f2bcc3a4
Bang & Olufsen sort supported media_player features alphabetically (#118476)
Sort supported media_player features alphabetically
2024-05-30 14:31:38 +02:00
Markus Jacobsen 7fda7ccafc
Convert unnecessary coroutines into functions (#118311) 2024-05-29 16:44:43 +02:00
Markus Jacobsen 8d7dff0228
Fix source_change not triggering an update (#118312) 2024-05-28 21:19:10 -04:00
Christopher Bailey c7a84b1c7b
Bump pydantic constraint (#116401)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-30 13:13:56 -05:00
Markus Jacobsen 0ed48c844d
Bump mozart-api to 3.4.1.8.5 (#113745) 2024-04-23 21:06:06 +02:00
Joost Lekkerkerker 0ea91515cf
Fix Bang & Olufsen enum naming (#113022) 2024-03-10 23:16:05 -04:00
Marc Mueller ff3a801936
Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00