Commit Graph

33 Commits (1ebcc34e6600b10c614c3797c9701e0b0d66b9aa)

Author SHA1 Message Date
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
Joost Lekkerkerker c1d45f63f5
Fix Bang and olufsen naming (#111344)
* Fix Bang and olufsen naming

* Fix

* Fix tests

* Fix tests
2024-03-07 20:15:52 +01:00
Erik Montnemery 6fe28d3764
Migrate integrations a-d to generic flowhandler (#111861) 2024-02-29 20:07:14 +01:00
Marc Mueller 5f8ef37f2d
Update pylint to 3.0.4 (#111229)
* Update pylint to 3.0.4

* Use yield from

* Remove unnecessary pylint disable comments
2024-02-23 23:46:00 +01:00
Markus Jacobsen 1d7e0e7fe4
Add bang_olufsen integration (#93462)
* Add bangolufsen integration

* add untested files to .coveragerc

* Simplify integration to media_player platform

* Remove missing files from .coveragerc

* Add beolink_set_relative_volume custom service
Tweaks

* Remove custom services
Remove grouping as it was dependent on custom services

* Update API to 3.2.1.150.0
Reduce and optimize code with feedback from joostlek
Tweaks

* Updated testing

* Remove unused options schema

* Fix bugfix setting wrong state

* Fix wrong initial state

* Bump API

* Fix Beosound Level not reconnecting properly

* Remove unused constant

* Fix wrong variable checked to determine source

* Update integration with feedback from emontnemery

* Update integration with feedback from emontnemery

* Remove unused code

* Move API client into dataclass
Fix not all config_flow exceptions caught
Tweaks

* Add Bang & Olufsen brand

* Revert "Add Bang & Olufsen brand"

This reverts commit 57b2722078.

* Remove volume options from setup
Simplify device checks
rename integration to bang_olufsen
update tests to pass
Update API

* Remove _device from base
Add _device to websocket

* Move SW version device update to websocket
Sort websocket variables

* Add WebSocket connection test

* Remove unused constants

* Remove confirmation form
Make discovered devices get added to Home Assistant immediately
Fix device not being available on mdns discovery
Change config flow aborts to forms with error

* Update tests for new config_flow
Add missing api_exception test

* Restrict manual and discovered IP addresses to IPv4

* Re-add confirmation step for zeroconf discovery
Improve error messages
Move exception mapping dict to module level

* Enable remote control WebSocket listener

* Update tests
2024-01-24 12:00:51 +01:00