Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Sonos: fix discovery for old Sonos ZP80 and ZP100 #4415

Merged
merged 1 commit into from Oct 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -74,7 +74,13 @@ public ThingUID getThingUID(RemoteDevice device) {
if (device.getDetails().getManufacturerDetails().getManufacturer() != null) {
if (device.getDetails().getManufacturerDetails().getManufacturer().toUpperCase().contains("SONOS")) {

ThingTypeUID thingUID = new ThingTypeUID(SonosBindingConstants.BINDING_ID, getModelName(device));
String modelName = getModelName(device);
if (modelName.equals("ZP80")) {
modelName = "PLAY3";
} else if (modelName.equals("ZP100")) {
modelName = "PLAY5";
}
ThingTypeUID thingUID = new ThingTypeUID(SonosBindingConstants.BINDING_ID, modelName);

// In case a new "unknown" Sonos player is discovered a generic ThingTypeUID will be used
if (!SonosBindingConstants.SUPPORTED_KNOWN_THING_TYPES_UIDS.contains(thingUID)) {
Expand Down