From 037e1f2370dbaf269e4fb4f8189a0dcabeba2c00 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sun, 14 Mar 2021 18:16:40 +0100 Subject: [PATCH] [sonos] Fix discovery of Ikea SYYMFONISK models (#10323) Fix #10313 Signed-off-by: Laurent Garnier --- .../internal/discovery/ZonePlayerDiscoveryParticipant.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/discovery/ZonePlayerDiscoveryParticipant.java b/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/discovery/ZonePlayerDiscoveryParticipant.java index d4458d430edfe..f9102a9e67bff 100644 --- a/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/discovery/ZonePlayerDiscoveryParticipant.java +++ b/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/discovery/ZonePlayerDiscoveryParticipant.java @@ -117,7 +117,10 @@ public Set 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) {