# check if player can be synced/grouped with the target player
if not (
child_player_id in parent_player.can_group_with
- or child_player.provider.instance_id in parent_player.can_group_with
+ or child_player.provider.lookup_key in parent_player.can_group_with
or "*" in parent_player.can_group_with
):
raise UnsupportedFeaturedException(
PlayerFeature.VOLUME_SET,
}
self._attr_volume_level = initial_volume
- self._attr_can_group_with = {provider.instance_id}
+ self._attr_can_group_with = {provider.lookup_key}
self._attr_enabled_by_default = not is_broken_raop_model(manufacturer, model)
async def get_config_entries(self) -> list[ConfigEntry]:
self._attr_available = True
self._attr_needs_poll = True
self._attr_poll_interval = 30
- self._attr_can_group_with = {provider.instance_id}
+ self._attr_can_group_with = {provider.lookup_key}
async def setup(self) -> None:
"""Set up the player."""
self._attr_name = self.zone_device.zone_data.name
# group
- self._attr_can_group_with = {self.provider.instance_id}
+ self._attr_can_group_with = {self.provider.lookup_key}
self._attr_available = True
PlayerFeature.VOLUME_MUTE,
PlayerFeature.PLAY_ANNOUNCEMENT,
}
- self._attr_can_group_with = {self.provider.instance_id}
+ self._attr_can_group_with = {self.provider.lookup_key}
async def volume_set(self, volume_level: int) -> None:
"""Send VOLUME_SET command to given player."""
)
self._attr_device_info.model = self.discovery_info["device"]["modelDisplayName"]
self._attr_device_info.manufacturer = self._provider.manifest.name
- self._attr_can_group_with = {self._provider.instance_id}
+ self._attr_can_group_with = {self._provider.lookup_key}
if SonosCapability.LINE_IN in self.discovery_info["device"]["capabilities"]:
self._attr_source_list.append(PLAYER_SOURCE_MAP[SOURCE_LINE_IN])
if x.player_id != airplay_player.player_id
)
else:
- self._attr_can_group_with = {self._provider.instance_id}
+ self._attr_can_group_with = {self._provider.lookup_key}
else:
# player is group child (synced to another player)
group_parent: SonosPlayer = self.mass.players.get(
ip_address=soco.ip_address,
)
self._attr_available = True
- self._attr_can_group_with = {provider.instance_id}
+ self._attr_can_group_with = {provider.lookup_key}
# Cached attributes
self.crossfade: bool = False
ip_address=client.device_address,
manufacturer=client.device_type,
)
- self._attr_can_group_with = {provider.instance_id}
+ self._attr_can_group_with = {provider.lookup_key}
async def setup(self) -> None:
"""Set up the player."""
)
# allow grouping with all providers, except the ugp provider itself
self._attr_can_group_with = {
- x.instance_id
+ x.lookup_key
for x in self.mass.players.providers
- if x.instance_id != self.provider.instance_id
+ if x.lookup_key != self.provider.lookup_key
}
self._set_attributes()