[somfytahoma] force the gateway discovery if the LAN mode is not working (#16751)

Signed-off-by: Ondrej Pecta <opecta@gmail.com>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
Ondrej Pecta 2024-05-19 13:31:14 +02:00 committed by Ciprian Pascu
parent 91a3bc1d8d
commit 4ac5dd40b1

View File

@ -307,8 +307,15 @@ public class SomfyTahomaBridgeHandler extends BaseBridgeHandler {
isDevModeReady() ? "LAN mode" : cloudFallback ? "Cloud mode fallback" : "Cloud mode");
} else {
logger.debug("Events id error: {}", id);
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
"unable to register events");
if (!thingConfig.isDevMode()) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
"unable to register events");
} else {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
"LAN mode is not properly configured");
logger.debug("Forcing the gateway discovery");
discoverGateway();
}
}
}
} catch (JsonSyntaxException e) {