Skip to content

Spotify connect volume adjustment throws exception and does not adjust volume #5627

@kneirinck

Description

@kneirinck

What server version of Music Assistant has the issue?

2.9.0

How is the MA server installed?

Home Assistant OS Addon

Mandatory: Carefully read the Troubleshooting FAQ and confirm that

  • I have examined the logs and tried to resolve this issue
  • I have fixed any errors or warnings in the logs that relate to tags
  • I am not running MA across a VPN, VLAN, subnet, behind a firewall, or using local SSL or have any other complex network setup
  • I am not using or have disabled tools such as AdGuard, Pi-hole or pfSense and retested
  • I have checked my network setup to ensure mDNS/multicast is not being blocked
  • I have reviewed the Open and Closed Issues and Discussions
  • I have reviewed the applicable player or music provider documentation
  • I have reviewed the MA Status Page
  • I have tried restarting MA and rebooting the host

As Applicable: Carefully read the Troubleshooting FAQ and confirm that

  • If using HA, I have confirmed the internal URL is set correctly
  • I have tried a wired connection for issues related to interrupted or poor playback quality
  • If the problem relates to a device then I have checked the device settings
  • If it is a frontend issue, I have tried a different widely used browser
  • For voice problems, I have sought help elsewhere before returning here
  • For playback problems, I have recycled power to the physical device

The problem

When using spotify connect without a spotify music provider installed the volume changes from inside the spotify app don't work.

In 2.8.0 this used to work correctly.
With 2.9.0 it seems there were changes to sync volume from inside MA towards spotify if you have the music provider installed.
The problem seems to be that a volume change initiated from the spotify app also triggers this sync which fails and stops the volume change from happening.

How to reproduce

No spotify music provider.
Connect through spotify connect to a speaker.
Change the volume from inside the spotify app.

Music Providers

spotify connection

Player Providers

squeezelite

Full log output

music-assistant.log

Additional information

I've been able to fix this by commenting out https://github.com/music-assistant/server/blob/69be0c919a8f015c5c99e4a0351977442ffb19d6/music_assistant/providers/spotify_connect/__init__.py#L436 in the on_volume_change method but this is clearly not a good solution.
I think if you can detect that the volume change originated from spotify events one could conditionally call await self._on_volume(volume) only if it did not originate from the spotify event that would fix it an a better manner.
But I don't know the codebase well enough to get this implemented :)

What version of Home Assistant Core (if used) are your running

2026.6.2

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Raspberry Pi

Have you included ALL of the information specified in the Troubleshooting FAQ or explained why you cannot

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions