Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for the new default grouping functionality #525

Merged
merged 2 commits into from
Jul 4, 2021

Conversation

micha91
Copy link
Contributor

@micha91 micha91 commented Jun 18, 2021

HA has defined a new service schema for join and unjoin in the media_player component. Future (official) integrations will use these services instead of implementing join/unjoin in their domain.
To enable using these base services, the platform has to be set to media_player in the cards config, so that it offers full backward compatibility.

This was already requested in #519 and will also be needed in the future for other integrations (such as the rewritten official musiccast integration).

@sprocket-9
Copy link

The default for MMP is that platforms do support the concept of a speaker group master and will use this.group[0] (this.attr.group_members[0] in media_players case) as the master entity.

For a custom integration that wants to use the base media_player.join/unjoin services that does not support the group master concept, if this.attr.group_members[0] doesn't match the entity for the card, the card stops working as expected.

One platform already overrides this https://github.com/kalkih/mini-media-player/blob/master/src/model.js#L213 setting but to allow platforms using these new services to work with MMP without modification, the supportsMaster() check would be better as a card yaml configuration option like supports_group_master: bool .

@micha91
Copy link
Contributor Author

micha91 commented Jul 3, 2021

The default for MMP is that platforms do support the concept of a speaker group master and will use this.group[0] (this.attr.group_members[0] in media_players case) as the master entity.

For a custom integration that wants to use the base media_player.join/unjoin services that does not support the group master concept, if this.attr.group_members[0] doesn't match the entity for the card, the card stops working as expected.

One platform already overrides this https://github.com/kalkih/mini-media-player/blob/master/src/model.js#L213 setting but to allow platforms using these new services to work with MMP without modification, the supportsMaster() check would be better as a card yaml configuration option like supports_group_master: bool .

Good point, didn't think about that - I implemented it, but as I do not have any system that does not support masters, I can not check, whether it works as expected. But from what I can see, there is no difference between the devices of a group anymore when I set supports_master: true in the speaker group section, so we should be all good.

@kalkih kalkih added the enhancement New feature or request label Jul 4, 2021
@kalkih
Copy link
Owner

kalkih commented Jul 4, 2021

Thanks, that's great.
Good idea with the configurable supports_master config as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants