Skip to content

Commit

Permalink
[sonos] Fix discovery of Ikea SYYMFONISK models (openhab#10323)
Browse files Browse the repository at this point in the history
Fix openhab#10313

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: John Marshall <john.marshall.au@gmail.com>
  • Loading branch information
lolodomo authored and themillhousegroup committed May 10, 2021
1 parent 9c0b80d commit a361cfc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ public Set<ThingTypeUID> getSupportedThingTypeUIDs() {
}

private String getModelName(RemoteDevice device) {
return SonosXMLParser.extractModelName(device.getDetails().getModelDetails().getModelName());
// For Ikea SYMFONISK models, the model name now starts with "SYMFONISK" with recent firmwares
// We can no more use extractModelName as it deletes the first word ("Sonos" for all other devices)
return device.getDetails().getModelDetails().getModelName().toUpperCase().contains("SYMFONISK") ? "SYMFONISK"
: SonosXMLParser.extractModelName(device.getDetails().getModelDetails().getModelName());
}

private @Nullable String getSonosRoomName(RemoteDevice device) {
Expand Down

0 comments on commit a361cfc

Please sign in to comment.