From d1b78982192d0522a729a6d73ecb6a4e3f7781a2 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Tue, 8 Apr 2025 15:44:35 +0200 Subject: [PATCH] Fix small typo in Music Assistant integration causing unavailable players (#142535) Fix small typo in Music Assistant integration causing issues with adding players --- homeassistant/components/music_assistant/media_player.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/music_assistant/media_player.py b/homeassistant/components/music_assistant/media_player.py index 005e5006b52..05fdbe85777 100644 --- a/homeassistant/components/music_assistant/media_player.py +++ b/homeassistant/components/music_assistant/media_player.py @@ -151,6 +151,9 @@ async def async_setup_entry( assert event.object_id is not None if event.object_id in added_ids: return + player = mass.players.get(event.object_id) + if TYPE_CHECKING: + assert player is not None if not player.expose_to_ha: return added_ids.add(event.object_id)