Skip to content

Commit

Permalink
Adjust for breaking Sonos change in HA 2022.5
Browse files Browse the repository at this point in the history
  • Loading branch information
spacegaier committed May 3, 2022
1 parent c493311 commit 3301ce9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ export default class MediaPlayerObject {
if (this.platform === PLATFORM.SQUEEZEBOX) {
return this._attr.sync_group || [];
}
if (this.platform === PLATFORM.MEDIAPLAYER || this.platform === PLATFORM.HEOS) {
if (this.platform === PLATFORM.MEDIAPLAYER || this.platform === PLATFORM.HEOS
|| PLATFORM.SONOS) {
return this._attr.group_members || [];
}
return (this._attr[`${this.platform}_group`] || []) as string[];
Expand Down Expand Up @@ -391,7 +392,7 @@ export default class MediaPlayerObject {
},
PLATFORM.SQUEEZEBOX,
);
case PLATFORM.MEDIAPLAYER:
case PLATFORM.MEDIAPLAYER || PLATFORM.SONOS:
return this.callService(
e,
'join',
Expand Down Expand Up @@ -420,7 +421,7 @@ export default class MediaPlayerObject {
return this.handleSoundtouch(e, 'REMOVE_ZONE_SLAVE', entity);
case PLATFORM.SQUEEZEBOX:
return this.callService(e, 'unsync', options, PLATFORM.SQUEEZEBOX);
case PLATFORM.MEDIAPLAYER:
case PLATFORM.MEDIAPLAYER || PLATFORM.SONOS:
return this.callService(
e,
'unjoin',
Expand Down

0 comments on commit 3301ce9

Please sign in to comment.