From: Matthew Skinner Date: Sat, 13 Mar 2021 19:25:08 +0000 (+1100) Subject: [espmilighthub] Fix things stay initializing (#10315) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=f085dc02a1fc76dc650f5c843556dd1138aed70b;p=openhab-addons.git [espmilighthub] Fix things stay initializing (#10315) Fixed bug caused by asking a bridge thing for its bridge's UID instead of just the UID. Signed-off-by: Matthew Skinner --- diff --git a/bundles/org.openhab.binding.mqtt.espmilighthub/src/main/java/org/openhab/binding/mqtt/espmilighthub/internal/handler/EspMilightHubHandler.java b/bundles/org.openhab.binding.mqtt.espmilighthub/src/main/java/org/openhab/binding/mqtt/espmilighthub/internal/handler/EspMilightHubHandler.java index 6182f79266..c2566c264c 100644 --- a/bundles/org.openhab.binding.mqtt.espmilighthub/src/main/java/org/openhab/binding/mqtt/espmilighthub/internal/handler/EspMilightHubHandler.java +++ b/bundles/org.openhab.binding.mqtt.espmilighthub/src/main/java/org/openhab/binding/mqtt/espmilighthub/internal/handler/EspMilightHubHandler.java @@ -347,10 +347,7 @@ public class EspMilightHubHandler extends BaseThingHandler implements MqttConnec "Bridge is missing or offline, you need to setup a working MQTT broker first."); return; } - ThingUID thingUID = localBridge.getBridgeUID(); - if (thingUID == null) { - return; - } + ThingUID thingUID = localBridge.getUID(); Thing thing = thingRegistry.get(thingUID); if (thing == null) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_UNINITIALIZED,