music-assistant-server

Branch:dev-lidarr-plugin

Commit Details

Stop the music when a speaker is powered off outside Music Assistant (#6077)

Follow-up to #6074. A speaker switched off with its own remote, or a power
control flipped directly in Home Assistant, never reaches the MA power command,
so its queue kept the session open and carried on pulling audio in the
background.

- An on->off power transition on an ungrouped player now ends that player's own
  queue, exactly as an MA power off does. Stereo pairs included
- Only the player's own queue is ended, never one it is only listening in on
- The stop waits fifteen seconds first, because Home Assistant reports an entity
  that is briefly unavailable as off
- A queue stop now releases its session, audio processing and item buffers even
  when the device itself could not be told to stop
Forgejo

Author

Marcel van der Veldt<[email protected]>
August 28, 2026 at 08:53 AM UTC

Committer

Marcel van der Veldt<[email protected]>
August 29, 2026 at 12:28 AM UTC
217additions
2deletions
4files changed

Parent commits

Changes

4 files
+217-2

Changed Files (4)

music_assistant/controllers/player_queues/
music_assistant/controllers/players/
tests/controllers/player_queues/
tests/controllers/players/
music_assistant/controllers/player_queues/controller.py
music_assistant/controllers/players/controller.py
+8
tests/controllers/player_queues/test_stop_teardown.py
tests/controllers/players/test_player_controller.py
+209-2