Skip to content

Commit

Permalink
[sonos] Added discovery of Sonos One SL (#6705)
Browse files Browse the repository at this point in the history
* [sonos] Discovery of Sonos One SL

Signed-off-by: Laurent Garnier <[email protected]>
  • Loading branch information
lolodomo authored and cweitkamp committed Jan 1, 2020
1 parent c231aed commit 83e8d69
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,18 @@ public ThingUID getThingUID(RemoteDevice device) {
if (device.getDetails().getManufacturerDetails().getManufacturer() != null) {
if (device.getDetails().getManufacturerDetails().getManufacturer().toUpperCase().contains("SONOS")) {
String modelName = getModelName(device);
if (modelName.equals("ZP80")) {
modelName = "CONNECT";
} else if (modelName.equals("ZP100")) {
modelName = "CONNECTAMP";
switch (modelName) {
case "ZP80":
modelName = "CONNECT";
break;
case "ZP100":
modelName = "CONNECTAMP";
break;
case "One SL":
modelName = "One";
break;
default:
break;
}
ThingTypeUID thingUID = new ThingTypeUID(SonosBindingConstants.BINDING_ID, modelName);
if (!SonosBindingConstants.SUPPORTED_KNOWN_THING_TYPES_UIDS.contains(thingUID)) {
Expand Down

0 comments on commit 83e8d69

Please sign in to comment.