mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[sonos] Ignore Sonos Boost at discovery (#17318)
Fixes #17307 Signed-off-by: Laurent Garnier <lg.hc@free.fr> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
a59d7f78e3
commit
93c536ea55
@ -1016,7 +1016,7 @@ public class SonosXMLParser {
|
||||
}
|
||||
// Finally remove unexpected characters in a thing type ID
|
||||
id = id.replaceAll("[^a-zA-Z0-9_]", "");
|
||||
// ZP80 is translated to CONNECT and ZP100 to CONNECTAMP
|
||||
// ZP80 is translated to CONNECT and ZP100 to CONNECTAMP; Boost is ignored
|
||||
switch (id) {
|
||||
case "ZP80":
|
||||
id = "CONNECT";
|
||||
@ -1024,6 +1024,9 @@ public class SonosXMLParser {
|
||||
case "ZP100":
|
||||
id = "CONNECTAMP";
|
||||
break;
|
||||
case "Boost":
|
||||
id = "";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -66,6 +66,11 @@ public class SonosXMLParserTest {
|
||||
assertEquals("OneSL", SonosXMLParser.buildThingTypeIdFromModelName("Sonos One SL (OpenHome)"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void buildThingTypeIdFromBoost() {
|
||||
assertEquals("", SonosXMLParser.buildThingTypeIdFromModelName("Sonos Boost"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getRadioTimeFromXML() throws IOException {
|
||||
InputStream resourceStream = getClass().getResourceAsStream("/OPML.xml");
|
||||
|
Loading…
Reference in New Issue
Block a user