]> git.basschouten.com Git - openhab-addons.git/commitdiff
[cbus] Fix exceptions due to invalid thing status updates (#14385)
authorJacob Laursen <jacob-github@vindvejr.dk>
Sat, 18 Feb 2023 18:12:21 +0000 (19:12 +0100)
committerGitHub <noreply@github.com>
Sat, 18 Feb 2023 18:12:21 +0000 (19:12 +0100)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
bundles/org.openhab.binding.cbus/src/main/java/org/openhab/binding/cbus/handler/CBusCGateHandler.java
bundles/org.openhab.binding.cbus/src/main/java/org/openhab/binding/cbus/handler/CBusNetworkHandler.java

index 0317ff82befb7c1ceaf1fa6a1f305c33e6a58e85..d644a7c24894217a0cbabea14f6ede3afe8ed108 100644 (file)
@@ -76,7 +76,7 @@ public class CBusCGateHandler extends BaseBridgeHandler {
         try {
             this.ipAddress = InetAddress.getByName(configuration.ipAddress);
         } catch (UnknownHostException e1) {
-            updateStatus(ThingStatus.UNINITIALIZED, ThingStatusDetail.HANDLER_INITIALIZING_ERROR,
+            updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR,
                     "IP Address not resolvable");
             return;
         }
index 8699ef857e814577fb20770844e9c43b8c585d91..8ebeae84940aae615b6b056aace366e72a160735 100644 (file)
@@ -171,7 +171,7 @@ public class CBusNetworkHandler extends BaseBridgeHandler {
             }
         } catch (CGateException e) {
             logger.warn("Cannot load C-Bus network {}", networkID, e);
-            updateStatus(ThingStatus.UNINITIALIZED, ThingStatusDetail.COMMUNICATION_ERROR);
+            updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR);
         }
         updateStatus();
     }