Skip to content

Commit

Permalink
Update media_player.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aunefyren committed Jan 31, 2024
1 parent 2688505 commit 3f33b64
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions custom_components/bluesound_alt/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,10 @@ async def force_update_sync_status(self, on_updated_cb=None, raise_timeout=False
new_device_group.append(device.entity_id)

# Add new group to master and slave
for device in new_device_group:
device._group_list = new_device_group
for main_device in self._hass.data[DATA_BLUESOUND]:
for device in new_device_group:
if main_device.id == device.id:
main_device._group_list = new_device_group

elif self._sync_status.get("slave") is not None:
# Device is a master
Expand Down Expand Up @@ -352,8 +354,10 @@ async def force_update_sync_status(self, on_updated_cb=None, raise_timeout=False
self._is_master = True

# Add new group to master and slave
for device in new_device_group:
device._group_list = new_device_group
for main_device in self._hass.data[DATA_BLUESOUND]:
for device in new_device_group:
if main_device.id == device.id:
main_device._group_list = new_device_group

else:
self._is_master = False
Expand Down

0 comments on commit 3f33b64

Please sign in to comment.