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 d202a77 commit 079a875
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions custom_components/bluesound_alt/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,8 @@ async def force_update_sync_status(self, on_updated_cb=None, raise_timeout=False
if str(device._id) == slave_id + ":" + slave_port:
new_device_group.append(device.entity_id)

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

elif self._sync_status.get("slave") is not None:
# Device is a master
Expand Down Expand Up @@ -350,11 +347,8 @@ async def force_update_sync_status(self, on_updated_cb=None, raise_timeout=False
new_device_group.append(device.entity_id)
self._is_master = True

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

else:
self._is_master = False
Expand Down

0 comments on commit 079a875

Please sign in to comment.