Skip to content

Commit

Permalink
Two issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aunefyren committed Jan 31, 2024
1 parent a9567bd commit fe87cec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/bluesound_alt/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ async def force_update_sync_status(self, on_updated_cb=None, raise_timeout=False

self._master._sync_status = resp_two["SyncStatus"].copy()

if self._master._sync_status["SyncStatus"]["slave"] != None:
if self._master._sync_status["slave"] != None:
# Extract information from slave objects
slave_objects = self._master._sync_status["SyncStatus"].get('slave', [])
slave_objects = self._master._sync_status.get('slave', [])
if isinstance(slave_objects, list):
# Multiple slave objects
for slave_obj in slave_objects:
Expand All @@ -317,7 +317,7 @@ async def force_update_sync_status(self, on_updated_cb=None, raise_timeout=False
# 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._id == device._id:
if main_device.entity_id == device:
main_device._group_list = new_device_group

elif self._sync_status.get("slave") is not None:
Expand Down Expand Up @@ -356,7 +356,7 @@ async def force_update_sync_status(self, on_updated_cb=None, raise_timeout=False
# 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._id == device._id:
if main_device.entity_id == device:
main_device._group_list = new_device_group

else:
Expand Down

0 comments on commit fe87cec

Please sign in to comment.