diff --git a/custom_components/mass/entity.py b/custom_components/mass/entity.py index 2e175762..b62e2a71 100644 --- a/custom_components/mass/entity.py +++ b/custom_components/mass/entity.py @@ -26,7 +26,7 @@ def __init__(self, mass: MusicAssistantClient, player_id: str) -> None: self.mass = mass self.player_id = player_id player = mass.players.get(player_id) - provider = self.mass.get_provider(player.provider) + provider = self.mass.get_provider(player.provider, True) if TYPE_CHECKING: assert provider is not None diff --git a/custom_components/mass/media_player.py b/custom_components/mass/media_player.py index 853e0e7d..de444fa3 100644 --- a/custom_components/mass/media_player.py +++ b/custom_components/mass/media_player.py @@ -64,6 +64,8 @@ from music_assistant_models.player import Player from music_assistant_models.player_queue import PlayerQueue + from . import MusicAssistantConfigEntry + SUPPORTED_FEATURES = ( MediaPlayerEntityFeature.PAUSE | MediaPlayerEntityFeature.VOLUME_SET @@ -126,7 +128,7 @@ async def wrapper( async def async_setup_entry( hass: HomeAssistant, - entry: MusicAssistantBaseEntity, + entry: MusicAssistantConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: """Set up Music Assistant MediaPlayer(s) from Config Entry."""