Skip to content

Commit

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

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo committed Mar 14, 2021
1 parent 286bced commit a2edd6e
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 a2edd6e

Please sign in to comment.