Fix player not available in HA at startup
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 22 Feb 2026 19:43:27 +0000 (20:43 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 22 Feb 2026 19:43:27 +0000 (20:43 +0100)
music_assistant/models/player.py

index 23379492585379af479754edf9d034283a57181d..65c2f836d68c565b723e35ca57cdf075576fe5d7 100644 (file)
@@ -833,7 +833,7 @@ class Player(ABC):
         This is a convenience property that returns True if the player is set to be exposed
         to Home Assistant, based on the config entry.
         """
-        return bool(self._config.get_value(CONF_EXPOSE_PLAYER_TO_HA))
+        return bool(self._config.get_value(CONF_EXPOSE_PLAYER_TO_HA, self.expose_to_ha_by_default))
 
     @property
     @final