music-assistant-server

Branch:dev-lidarr-plugin

Commit Details

Detach a stereo pair from its group when it is powered off (#6084)

# What does this implement/fix?

Follow-up to #6077. A stereo pair can be a member of a group or a sync
leader just like a
single speaker, but both power-off ungroup branches only acted on
`PlayerType.PLAYER`. A
stereo pair that was switched off - by an MA power command, or by its
power control being
flipped directly in Home Assistant - stayed in its group, so the group
carried on streaming
to a speaker that is off. A single speaker in the same spot is detached.

Found while reviewing #6077, not from a user report, hence the
maintenance label.

- All three power-off group branches now cover stereo pairs as well as
single speakers
- Group players stay excluded on purpose: a group player has no group of
its own to leave,
  and ungrouping one is defined as powering it off

**Related issue (if applicable):**

- n/a

## Types of changes

<!--
Tick exactly one box. CI (.github/workflows/pr-labels.yaml) derives
the label from the ticked box and applies it automatically; the
release-notes generator uses that same label to slot this change
into the next release notes.
-->

- [ ] Bugfix (non-breaking change which fixes an issue) — `bugfix`
- [ ] New feature (non-breaking change which adds functionality) —
`new-feature`
- [ ] Enhancement to an existing feature — `enhancement`
- [ ] New music/player/metadata/plugin provider — `new-provider`
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected) — `breaking-change`
- [ ] Refactor (no behaviour change) — `refactor`
- [ ] Documentation only — `documentation`
- [x] Maintenance / chore — `maintenance`
- [ ] CI / workflow change — `ci`
- [ ] Dependencies bump — `dependencies`

## Checklist

- [x] The code change is tested and works locally.
- [x] `pre-commit run --all-files` passes.
- [x] `pytest` passes, and tests have been added/updated under `tests/`
where applicable.
- [ ] For changes to shared models, the companion PR in
`music-assistant/models` is linked.
- [ ] For changes affecting the UI, the companion PR in
`music-assistant/frontend` is linked.
- [x] I have read and complied with the project's [AI
Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md)
for any AI-assisted contributions.
- [ ] I have [raised a PR against the documentation
repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md)
targeting the main or beta branch as appropriate.
Forgejo

Author

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

Committer

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

Parent commits

Changes

2 files
+153-13

Changed Files (2)

music_assistant/controllers/players/
tests/controllers/players/
music_assistant/controllers/players/controller.py
+9-2
tests/controllers/players/test_player_controller.py
+144-11