From 02484bccac7874265716e94bc9cd0c7afd68d0b7 Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Fri, 11 Sep 2020 08:23:28 +0200 Subject: [PATCH] [plugwise] Add bridgeUID to thingUID during discovery (#8445) Signed-off-by: Wouter Born --- .../plugwise/internal/PlugwiseThingDiscoveryService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.plugwise/src/main/java/org/openhab/binding/plugwise/internal/PlugwiseThingDiscoveryService.java b/bundles/org.openhab.binding.plugwise/src/main/java/org/openhab/binding/plugwise/internal/PlugwiseThingDiscoveryService.java index b416321e3e181..cbd523affd64b 100644 --- a/bundles/org.openhab.binding.plugwise/src/main/java/org/openhab/binding/plugwise/internal/PlugwiseThingDiscoveryService.java +++ b/bundles/org.openhab.binding.plugwise/src/main/java/org/openhab/binding/plugwise/internal/PlugwiseThingDiscoveryService.java @@ -125,9 +125,10 @@ public void activate() { private DiscoveryResult createDiscoveryResult(DiscoveredNode node) { String mac = node.macAddress.toString(); - ThingUID thingUID = new ThingUID(PlugwiseUtils.getThingTypeUID(node.deviceType), mac); + ThingUID bridgeUID = stickHandler.getThing().getUID(); + ThingUID thingUID = new ThingUID(PlugwiseUtils.getThingTypeUID(node.deviceType), bridgeUID, mac); - return DiscoveryResultBuilder.create(thingUID).withBridge(stickHandler.getThing().getUID()) + return DiscoveryResultBuilder.create(thingUID).withBridge(bridgeUID) .withLabel("Plugwise " + node.deviceType.toString()) .withProperty(PlugwiseBindingConstants.CONFIG_PROPERTY_MAC_ADDRESS, mac) .withProperties(new HashMap<>(node.properties))