boolean needsUpdate = reconciliation;
for (Thing th : getThing().getThings()) {
- if (ThingStatus.ONLINE != th.getStatus()) {
+ if (th.isEnabled() && ThingStatus.ONLINE != th.getStatus()) {
needsUpdate = true;
}
}
private void processGatewayEvent(SomfyTahomaEvent event) {
// update gateway status
for (Thing th : getThing().getThings()) {
- if (THING_TYPE_GATEWAY.equals(th.getThingTypeUID())) {
+ if (th.isEnabled() && THING_TYPE_GATEWAY.equals(th.getThingTypeUID())) {
SomfyTahomaGatewayHandler gatewayHandler = (SomfyTahomaGatewayHandler) th.getHandler();
if (gatewayHandler != null && gatewayHandler.getGateWayId().equals(event.getGatewayId())) {
gatewayHandler.refresh(STATUS);
handler.updateThingChannels(states);
}
} else {
- logger.debug("Thing handler is null, probably not bound thing.");
+ logger.debug("Thing is disabled or handler is null, probably not bound thing.");
}
}
private @Nullable Thing getThingByDeviceUrl(String deviceUrl) {
for (Thing th : getThing().getThings()) {
+ if (!th.isEnabled()) {
+ continue;
+ }
String url = (String) th.getConfiguration().get("url");
if (deviceUrl.equals(url)) {
return th;