[sonos] Fix discovery of Ikea SYYMFONISK models (#10323)

Fix #10313

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2021-03-14 18:16:40 +01:00 committed by GitHub
parent 5f1dd38083
commit a5a7070d71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,7 +117,10 @@ public class ZonePlayerDiscoveryParticipant implements UpnpDiscoveryParticipant
}
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) {