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

Commit

Permalink
Sonos: fix discovery for old Sonos ZP80 and ZP100 (#4415)
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo authored and maggu2810 committed Oct 13, 2017
1 parent b4be492 commit de8b31b
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit de8b31b

Please sign in to comment.