From 97026fe7467cda5486509144c3ccf1bc2f2abbd8 Mon Sep 17 00:00:00 2001 From: Andre Fuechsel Date: Mon, 1 Aug 2016 17:33:18 +0200 Subject: [PATCH] Change the hue binding to include the thing type id in the thingUID again (#1946) Fixes: #1863 Signed-off-by: Andre Fuechsel --- .../org.eclipse.smarthome.binding.hue.test.launch | 3 ++- .../binding/hue/test/HueLightDiscoveryServiceOSGITest.groovy | 2 +- .../hue/internal/discovery/HueLightDiscoveryService.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/binding/org.eclipse.smarthome.binding.hue.test/org.eclipse.smarthome.binding.hue.test.launch b/extensions/binding/org.eclipse.smarthome.binding.hue.test/org.eclipse.smarthome.binding.hue.test.launch index 6f2b8e71fe6..d288de956a2 100644 --- a/extensions/binding/org.eclipse.smarthome.binding.hue.test/org.eclipse.smarthome.binding.hue.test.launch +++ b/extensions/binding/org.eclipse.smarthome.binding.hue.test/org.eclipse.smarthome.binding.hue.test.launch @@ -12,6 +12,7 @@ + @@ -33,7 +34,7 @@ - + diff --git a/extensions/binding/org.eclipse.smarthome.binding.hue.test/src/test/groovy/org/eclipse/smarthome/binding/hue/test/HueLightDiscoveryServiceOSGITest.groovy b/extensions/binding/org.eclipse.smarthome.binding.hue.test/src/test/groovy/org/eclipse/smarthome/binding/hue/test/HueLightDiscoveryServiceOSGITest.groovy index 9013c987649..f12946adba4 100644 --- a/extensions/binding/org.eclipse.smarthome.binding.hue.test/src/test/groovy/org/eclipse/smarthome/binding/hue/test/HueLightDiscoveryServiceOSGITest.groovy +++ b/extensions/binding/org.eclipse.smarthome.binding.hue.test/src/test/groovy/org/eclipse/smarthome/binding/hue/test/HueLightDiscoveryServiceOSGITest.groovy @@ -135,7 +135,7 @@ class HueLightDiscoveryServiceOSGITest extends OSGiTest { resultWrapper.wrappedObject.with { assertThat flag, is (DiscoveryResultFlag.NEW) - assertThat thingUID.toString(), is("hue::testBridge:" + light.id) + assertThat thingUID.toString(), is("hue:0210:testBridge:" + light.id) assertThat thingTypeUID, is (THING_TYPE_EXTENDED_COLOR_LIGHT) assertThat bridgeUID, is(hueBridge.getUID()) assertThat properties.get(LIGHT_ID), is (light.id) diff --git a/extensions/binding/org.eclipse.smarthome.binding.hue/src/main/java/org/eclipse/smarthome/binding/hue/internal/discovery/HueLightDiscoveryService.java b/extensions/binding/org.eclipse.smarthome.binding.hue/src/main/java/org/eclipse/smarthome/binding/hue/internal/discovery/HueLightDiscoveryService.java index a98d2ae580e..5b44170621c 100644 --- a/extensions/binding/org.eclipse.smarthome.binding.hue/src/main/java/org/eclipse/smarthome/binding/hue/internal/discovery/HueLightDiscoveryService.java +++ b/extensions/binding/org.eclipse.smarthome.binding.hue/src/main/java/org/eclipse/smarthome/binding/hue/internal/discovery/HueLightDiscoveryService.java @@ -147,7 +147,7 @@ private ThingUID getThingUID(FullLight light) { ThingTypeUID thingTypeUID = getThingTypeUID(light); if (thingTypeUID != null && getSupportedThingTypes().contains(thingTypeUID)) { - return new ThingUID(BINDING_ID, bridgeUID, light.getId()); + return new ThingUID(thingTypeUID, bridgeUID, light.getId()); } else { return null; }