Source:
<code>public void bridgeStatusChanged(ThingStatusInfo bridgeStatusInfo) { if (bridgeStatusInfo.getStatus().equals(ThingStatus.ONLINE)) { if (getBridgeHandler() != null && scene == null) { String sceneID = getSceneID(getConfig(), bridgeHandler); switch (sceneID) { case SCENE_WRONG: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Configured scene '" + getConfig().get(DigitalSTROMBindingConstants.SCENE_ID) + "' does not exist or cannot be used, please check the configuration."); break; case ZONE_WRONG: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Configured zone '" + getConfig().get(DigitalSTROMBindingConstants.ZONE_ID) + "' does not exist, please check the configuration."); break; case GROUP_WRONG: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Configured group '" + getConfig().get(DigitalSTROMBindingConstants.GROUP_ID) + "' does not exist, please check the configuration."); break; case NO_STRUC_MAN: updateStatus(ThingStatus.ONLINE, ThingStatusDetail.CONFIGURATION_PENDING, "Waiting for building digitalSTROM model."); break; case NO_SCENE: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "No Scene-ID is set!"); break; default: this.sceneThingID = sceneID; updateStatus(ThingStatus.ONLINE, ThingStatusDetail.CONFIGURATION_PENDING, "Waiting for listener registration"); logger.debug("Set status on {}", getThing().getStatus()); this.bridgeHandler.registerSceneStatusListener(this); } } else { <START> updateStatus(ThingStatus.ONLINE); <END> } } if (bridgeStatusInfo.getStatus().equals(ThingStatus.OFFLINE)) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE); } if (bridgeStatusInfo.getStatus().equals(ThingStatus.REMOVED)) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE, "Bridge has been removed."); } logger.debug("Set status to {}", getThing().getStatusInfo()); }</code><technical_language>If bridgeHandler is null set ONLINE</technical_language>

Target:
public void bridgeStatusChanged(ThingStatusInfo bridgeStatusInfo) { if (bridgeStatusInfo.getStatus().equals(ThingStatus.ONLINE)) { if (getBridgeHandler() != null) { if (scene == null) { String sceneID = getSceneID(getConfig(), bridgeHandler); switch (sceneID) { case SCENE_WRONG: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Configured scene '" + getConfig().get(DigitalSTROMBindingConstants.SCENE_ID) + "' does not exist or cannot be used, please check the configuration."); break; case ZONE_WRONG: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Configured zone '" + getConfig().get(DigitalSTROMBindingConstants.ZONE_ID) + "' does not exist, please check the configuration."); break; case GROUP_WRONG: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Configured group '" + getConfig().get(DigitalSTROMBindingConstants.GROUP_ID) + "' does not exist, please check the configuration."); break; case NO_STRUC_MAN: updateStatus(ThingStatus.ONLINE, ThingStatusDetail.CONFIGURATION_PENDING, "Waiting for building digitalSTROM model."); break; case NO_SCENE: updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "No Scene-ID is set!"); break; default: this.sceneThingID = sceneID; updateStatus(ThingStatus.ONLINE, ThingStatusDetail.CONFIGURATION_PENDING, "Waiting for listener registration"); logger.debug("Set status on {}", getThing().getStatus()); this.bridgeHandler.registerSceneStatusListener(this); } } else { updateStatus(ThingStatus.ONLINE); } } else { updateStatus(ThingStatus.OFFLINE); } } if (bridgeStatusInfo.getStatus().equals(ThingStatus.OFFLINE)) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE); } if (bridgeStatusInfo.getStatus().equals(ThingStatus.REMOVED)) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE, "Bridge has been removed."); } logger.debug("Set status to {}", getThing().getStatusInfo()); }