[digitalstrom] remove unnecessary call to bridgeStatusChanged (#9263)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
parent
a44f7f17cc
commit
beacec311e
@ -64,7 +64,6 @@ import org.openhab.core.thing.ThingStatusDetail;
|
|||||||
import org.openhab.core.thing.ThingTypeUID;
|
import org.openhab.core.thing.ThingTypeUID;
|
||||||
import org.openhab.core.thing.binding.BaseBridgeHandler;
|
import org.openhab.core.thing.binding.BaseBridgeHandler;
|
||||||
import org.openhab.core.thing.binding.ThingHandler;
|
import org.openhab.core.thing.binding.ThingHandler;
|
||||||
import org.openhab.core.thing.binding.builder.ThingStatusInfoBuilder;
|
|
||||||
import org.openhab.core.types.Command;
|
import org.openhab.core.types.Command;
|
||||||
import org.openhab.core.types.RefreshType;
|
import org.openhab.core.types.RefreshType;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -367,14 +366,8 @@ public class BridgeHandler extends BaseBridgeHandler
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleRemoval() {
|
public void handleRemoval() {
|
||||||
for (Thing thing : getThing().getThings()) {
|
String applicationToken = (String) super.getConfig().get(APPLICATION_TOKEN);
|
||||||
// Inform Thing-Child's about removed bridge.
|
if (applicationToken != null && !applicationToken.isEmpty()) {
|
||||||
final ThingHandler thingHandler = thing.getHandler();
|
|
||||||
if (thingHandler != null) {
|
|
||||||
thingHandler.bridgeStatusChanged(ThingStatusInfoBuilder.create(ThingStatus.REMOVED).build());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotBlank((String) super.getConfig().get(APPLICATION_TOKEN))) {
|
|
||||||
if (connMan == null) {
|
if (connMan == null) {
|
||||||
Config config = loadAndCheckConnectionData(this.getConfig());
|
Config config = loadAndCheckConnectionData(this.getConfig());
|
||||||
if (config != null) {
|
if (config != null) {
|
||||||
|
|||||||
@ -151,9 +151,6 @@ public class CircuitHandler extends BaseThingHandler implements DeviceStatusList
|
|||||||
if (bridgeStatusInfo.getStatus().equals(ThingStatus.OFFLINE)) {
|
if (bridgeStatusInfo.getStatus().equals(ThingStatus.OFFLINE)) {
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_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());
|
logger.debug("Set status to {}", getThing().getStatusInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -176,9 +176,6 @@ public class DeviceHandler extends BaseThingHandler implements DeviceStatusListe
|
|||||||
if (bridgeStatusInfo.getStatus().equals(ThingStatus.OFFLINE)) {
|
if (bridgeStatusInfo.getStatus().equals(ThingStatus.OFFLINE)) {
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_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());
|
logger.debug("Set status to {}", getThing().getStatusInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -171,9 +171,6 @@ public class SceneHandler extends BaseThingHandler implements SceneStatusListene
|
|||||||
if (bridgeStatusInfo.getStatus().equals(ThingStatus.OFFLINE)) {
|
if (bridgeStatusInfo.getStatus().equals(ThingStatus.OFFLINE)) {
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_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());
|
logger.debug("Set status to {}", getThing().getStatusInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -186,9 +186,6 @@ public class ZoneTemperatureControlHandler extends BaseThingHandler implements T
|
|||||||
if (bridgeStatusInfo.getStatus().equals(ThingStatus.OFFLINE)) {
|
if (bridgeStatusInfo.getStatus().equals(ThingStatus.OFFLINE)) {
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_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());
|
logger.debug("Set status to {}", getThing().getStatusInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user