Music Assistant Add-On Works, but Integration Doesn't

Hello, I was wondering if anybody knew what was going on here (and yes, I have uninstalled and reinstalled both the add-on and the integrations multiple times, too!):

I have installed Music Assistant server version 2.5.2 as an add-on. I have set up multiple music providers. I have set up Chromecast player provider for my Google Nest Minis. I have installed Music Assistant server version 2.5.2. I have set up multiple music providers. I have set up Chromecast player provider for my Google Nest Minis. I have even set up Home Assistant as a plugin provider. The Streamserver page has the same IP address as HA, so that’s good.

So far, so good. I can access the Music Assistant UI through HA and play music to any of my speakers as I wish.

I see HA offering me two new integrations. Music Assistant and Music Assistant (CUSTOM). If I choose custom, it DOES work (but I get a Repair notice saying that its deprecated and I should migrated). If I choose the default standard option, it says it has successfully configured Music Assistant integration, but as you can see, it doesn’t really work.

Here is the error message that pops up in the logs:

Logger: homeassistant.config_entries
Source: config_entries.py:749
First occurred: 1:33:37 PM (1 occurrence)
Last logged: 1:33:37 PM

Error setting up entry Music Assistant for music_assistant
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 749, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/music_assistant/__init__.py", line 123, in async_setup_entry
    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2568, in async_forward_entry_setups
    await integration.async_get_platforms(platforms)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1163, in async_get_platforms
    import_future.result()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1151, in async_get_platforms
    platforms.update(self._load_platforms(platform_names))
                     ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1076, in _load_platforms
    platform_name: self._load_platform(platform_name)
                   ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1250, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1282, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 201, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/src/homeassistant/homeassistant/components/music_assistant/media_player.py", line 12, in <module>
    from music_assistant_models.constants import PLAYER_CONTROL_NONE
ImportError: cannot import name 'PLAYER_CONTROL_NONE' from 'music_assistant_models.constants' (/usr/local/lib/python3.13/site-packages/music_assistant_models/constants.py)

Does anybody have any idea what is going on? Is there anything that I can do to fix this?

Many thanks,
David

I might ask here…
Music assistant
The people that are watching that thread are all either interested. users of, or authors of Music Assistant.
They are likely your best resource.
Also there is a Discord: Music Assistant

Did you ever make any progress on this? I’m running into the same issue. Running 2.5.2 MA Add-on and using the built-in HA Integration (HA 2025.5.3) yields the same error messages.

I’m also getting this issue, seems like it also hangs my container intermittently. Anyone have a solution?

It is because you still have the old HACS integration installed, you need to remove that.

I have 2.0.5 HACS installed

I meant you have the old Music Assistant custom integration from HACS Installed. That needs to be removed.

Oh, Is there a different one I should be using? I only see the one Music Assistant Integration through Integration, not the (Custom) legacy one from HACS.

I see the following error, how can I tell which one I’m using?

2025-05-30 10:57:57.733 ERROR (MainThread) [homeassistant.components.homeassistant_alerts.coordinator] Error requesting homeassistant_alerts data: Cannot connect to host alerts.home-assistant.io:443 ssl:default [Timeout while contacting DNS servers]

2025-05-30 14:26:34.324 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Music Assistant for music_assistant

Traceback (most recent call last):

  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 749, in __async_setup_with_context

    result = await component.async_setup_entry(hass, self)

             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/src/homeassistant/homeassistant/components/music_assistant/__init__.py", line 64, in async_setup_entry

    mass = MusicAssistantClient(mass_url, http_session)

  File "/usr/local/lib/python3.13/site-packages/music_assistant_client/client.py", line 53, in __init__

    self.connection = WebsocketsConnection(server_url, aiohttp_session)

                      ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.13/site-packages/music_assistant_client/connection.py", line 40, in __init__

    self.ws_server_url = get_websocket_url(server_url)

                         ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^

  File "/usr/local/lib/python3.13/site-packages/music_assistant_client/connection.py", line 28, in get_websocket_url

    raise RuntimeError(msg)

RuntimeError: 192.168.1.2:8095 is not a valid url

Hey everyone, I did manage to solve this - what I did was first uninstall Music Assistant again, and then I went into the File Editor and manually sifted through the directories and removed EVERY file that I could find that was associated with Music Assistant - apparently the remnants of an older installation were still in there.

It took a few minutes and then I rebooted HA (to make sure it was all clear), and I could then finally install Music Assistant properly.

That didn’t seem to work for. Me, this is the first time I tried to install the add on in HA

You need to confirm that you do NOT have the HACS component installed. You can physically check in both config/custom components as well as config/www/community and make sure there is no mass or music_assistant folders there.

Yeah, confirming there’s nothing there. Even did a “find” for those terms.

Unusual then. Is MA otherwise working fine? Are you using a supported installation method? Do you have a simple network setup?

Docker setup, both on the same server. Works otherwise, and music assistant can see home assistant devices - home assistant just cant see music assistant.

version: '3'
services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /my/has/config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host

  music-assistant-server:
    image: ghcr.io/music-assistant/server:latest 
    container_name: music-assistant-server
    restart: unless-stopped
    # Network mode must be set to host for MA to work correctly
    network_mode: host
    volumes:
      - /my/music-assistant-server/data:/data/
      - /my/media/music:/music/
    cap_add:
      - SYS_ADMIN
      - DAC_READ_SEARCH
    security_opt:
      - apparmor:unconfined
    environment:
      - LOG_LEVEL=info
      - PUID=100
      - PGID=100

Try without those last two environment variables.

They’re needed to access my music library, no?

Edit: I was also having stability issues with my HomeAssistant disconnecting, stopping my music assistant docker fixed that. Looks like it was still trying to connect from music assistant side to that same URL, giving the same error, and intermittently crashing lovelace.

I don’t know what your setup is but no one else I have heard of has those variables. If you have stability issues you will need to look at your situation as no one else is reporting that to my knowledge.