Commit Graph

8 Commits (22e72953e543ec3d5727f07d98c1668fc6d3d6a2)

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
Erik Montnemery ecb3bf79f3
Revert "Add support for subentries to config entries" (#133470)
Revert "Add support for subentries to config entries (#117355)"

This reverts commit ad15786115.
2024-12-18 13:51:05 +01:00
Erik Montnemery ad15786115
Add support for subentries to config entries (#117355)
* Add support for subentries to config entries

* Improve error handling and test coverage

* Include subentry_id in subentry containers

* Auto-generate subentry_id and add optional unique_id

* Tweak

* Update tests

* Fix stale docstring

* Address review comments

* Typing tweaks

* Add methods to ConfigEntries to add and remove subentry

* Improve ConfigSubentryData typed dict

* Update test snapshots

* Adjust tests

* Fix unique_id logic

* Allow multiple subentries with None unique_id

* Add number of subentries to config entry JSON representation

* Add subentry translation support

* Allow integrations to implement multiple subentry flows

* Update translations schema

* Adjust exception text

* Change subentry flow init step to user

* Prevent creating a subentry with colliding unique_id

* Update tests

* Address review comments

* Remove duplicaetd unique_id collision check

* Remove change from the future

* Improve test coverage

* Add default value for unique_id
2024-12-12 20:16:18 +01: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 ad19c5f9c1
Remove Bang & Olufsen static icon (#131528) 2024-11-26 09:23:08 +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