[cbus] Fix exceptions due to invalid thing status updates (#14385)

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen 2023-02-18 19:12:21 +01:00 committed by GitHub
parent 1bc00a0dd8
commit b9a7e1f346
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ public class CBusCGateHandler extends BaseBridgeHandler {
try { try {
this.ipAddress = InetAddress.getByName(configuration.ipAddress); this.ipAddress = InetAddress.getByName(configuration.ipAddress);
} catch (UnknownHostException e1) { } catch (UnknownHostException e1) {
updateStatus(ThingStatus.UNINITIALIZED, ThingStatusDetail.HANDLER_INITIALIZING_ERROR, updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR,
"IP Address not resolvable"); "IP Address not resolvable");
return; return;
} }

View File

@ -171,7 +171,7 @@ public class CBusNetworkHandler extends BaseBridgeHandler {
} }
} catch (CGateException e) { } catch (CGateException e) {
logger.warn("Cannot load C-Bus network {}", networkID, e); logger.warn("Cannot load C-Bus network {}", networkID, e);
updateStatus(ThingStatus.UNINITIALIZED, ThingStatusDetail.COMMUNICATION_ERROR); updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR);
} }
updateStatus(); updateStatus();
} }