Skip to content

Comments

Feature/get groupable players 2342#2

Draft
dan-s-github wants to merge 23 commits intodan-devfrom
feature/get-groupable-players-2342
Draft

Feature/get groupable players 2342#2
dan-s-github wants to merge 23 commits intodan-devfrom
feature/get-groupable-players-2342

Conversation

@dan-s-github
Copy link
Owner

@dan-s-github dan-s-github commented Jan 20, 2026

Proposed change

This PR implements the service portion of the feature request from Discussion #2342, adding media_player.get_groupable_players service that allows users and automations to dynamically discover which media players can be grouped together for synchronous playback.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new get_groupable_players service to the media_player component that returns a list of media players that can be grouped together for synchronized playback. The service is restricted to entities with GROUPING feature support and returns only players from the same platform as the calling entity.

Changes:

  • Adds new service get_groupable_players with service response support
  • Implements async_get_groupable_players method that filters media players by platform and GROUPING feature
  • Includes comprehensive test coverage for the new service functionality

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
homeassistant/components/media_player/init.py Adds entity_registry import, registers new service, and implements async_get_groupable_players method
homeassistant/components/media_player/const.py Defines SERVICE_GET_GROUPABLE_MEMBERS constant
homeassistant/components/media_player/services.yaml Adds service definition and includes unrelated max value change
homeassistant/components/media_player/strings.json Adds service name and description
homeassistant/components/media_player/icons.json Adds service icon
tests/components/media_player/test_init.py Adds 4 test cases covering basic functionality, feature validation, platform filtering, and multiplatform scenarios

dan-s-github and others added 7 commits January 21, 2026 19:37
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

Copilot AI commented Jan 21, 2026

@dan-s-github I've opened a new pull request, #3, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 5 commits January 21, 2026 06:46
Co-authored-by: dan-s-github <20974454+dan-s-github@users.noreply.github.com>
Co-authored-by: dan-s-github <20974454+dan-s-github@users.noreply.github.com>
Fix cross-platform grouping tests for get_groupable_players
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants