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>
This commit is contained in:
Markus Jacobsen 2024-05-31 04:23:43 +02:00 committed by GitHub
parent 2b4e9212bc
commit cb502263fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -176,7 +176,7 @@ class BangOlufsenMediaPlayer(BangOlufsenEntity, MediaPlayerEntity):
async_dispatcher_connect( async_dispatcher_connect(
self.hass, self.hass,
f"{self._unique_id}_{WebsocketNotification.REMOTE_MENU_CHANGED}", f"{self._unique_id}_{WebsocketNotification.REMOTE_MENU_CHANGED}",
self._update_sources, self._async_update_sources,
) )
) )
self.async_on_remove( self.async_on_remove(
@ -235,12 +235,12 @@ class BangOlufsenMediaPlayer(BangOlufsenEntity, MediaPlayerEntity):
self._media_image = get_highest_resolution_artwork(self._playback_metadata) self._media_image = get_highest_resolution_artwork(self._playback_metadata)
# If the device has been updated with new sources, then the API will fail here. # If the device has been updated with new sources, then the API will fail here.
await self._update_sources() await self._async_update_sources()
# Set the static entity attributes that needed more information. # Set the static entity attributes that needed more information.
self._attr_source_list = list(self._sources.values()) self._attr_source_list = list(self._sources.values())
async def _update_sources(self) -> None: async def _async_update_sources(self) -> None:
"""Get sources for the specific product.""" """Get sources for the specific product."""
# Audio sources # Audio sources