Commit Graph

11 Commits (58f7dd5dcc92437f16b57fd57d26030cf4e1fdd5)

Author SHA1 Message Date
Markus Jacobsen e188d9a00c
Fix Bang & Olufsen event testing (#135707)
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
2025-01-16 18:06:18 +00: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
Markus Jacobsen 31b505828b
Simplify Bang & Olufsen source determination (#130072) 2024-11-09 17:13:07 +01:00
Markus Jacobsen f6f89bd807
Update Bang & Olufsen source list as availability changes (#129910) 2024-11-06 11:52:00 +01: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 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 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 45843a3112
Add Bang & Olufsen media_player testing (#120580) 2024-07-08 22:19:02 +02:00
Marc Mueller aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +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