From b9a7e1f346f5007f6d3907ff3ca1690682c42885 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Sat, 18 Feb 2023 19:12:21 +0100 Subject: [PATCH] [cbus] Fix exceptions due to invalid thing status updates (#14385) Signed-off-by: Jacob Laursen --- .../java/org/openhab/binding/cbus/handler/CBusCGateHandler.java | 2 +- .../org/openhab/binding/cbus/handler/CBusNetworkHandler.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.cbus/src/main/java/org/openhab/binding/cbus/handler/CBusCGateHandler.java b/bundles/org.openhab.binding.cbus/src/main/java/org/openhab/binding/cbus/handler/CBusCGateHandler.java index 0317ff82b..d644a7c24 100644 --- a/bundles/org.openhab.binding.cbus/src/main/java/org/openhab/binding/cbus/handler/CBusCGateHandler.java +++ b/bundles/org.openhab.binding.cbus/src/main/java/org/openhab/binding/cbus/handler/CBusCGateHandler.java @@ -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; } diff --git a/bundles/org.openhab.binding.cbus/src/main/java/org/openhab/binding/cbus/handler/CBusNetworkHandler.java b/bundles/org.openhab.binding.cbus/src/main/java/org/openhab/binding/cbus/handler/CBusNetworkHandler.java index 8699ef857..8ebeae849 100644 --- a/bundles/org.openhab.binding.cbus/src/main/java/org/openhab/binding/cbus/handler/CBusNetworkHandler.java +++ b/bundles/org.openhab.binding.cbus/src/main/java/org/openhab/binding/cbus/handler/CBusNetworkHandler.java @@ -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(); }