Skip to content

Commit

Permalink
Self corrections
Browse files Browse the repository at this point in the history
Signed-off-by: gael@lhopital.org <gael@lhopital.org>
  • Loading branch information
clinique committed Mar 25, 2024
1 parent 3f693e1 commit c01c73d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ default void commonInitialize() {
} else if (!ThingStatus.ONLINE.equals(bridge.getStatus())) {
setThingStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE, null);
getCapabilities().remove(RefreshAutoCapability.class);
getCapabilities().remove(RefreshCapability.class);
getCapabilities().remove(ParentUpdateCapability.class);
} else {
setThingStatus(ThingStatus.UNKNOWN, ThingStatusDetail.NONE, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ public void initialize() {

public void expireData() {
CommonInterface bridgeHandler = handler.getBridgeHandler();
if (bridgeHandler != null && !handler.getCapabilities().containsKey(RefreshAutoCapability.class)) {
if (bridgeHandler != null && !(handler.getCapabilities().containsKey(RefreshAutoCapability.class)
|| handler.getCapabilities().containsKey(RefreshCapability.class))) {
bridgeHandler.expireData();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,4 @@ protected void afterNewData(@Nullable NAObject newData) {
properties.put("probing", Boolean.valueOf(probing()).toString());
super.afterNewData(newData);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ protected void afterNewData(@Nullable NAObject newData) {
properties.put("dataValidity", dataValidity.toString());
super.afterNewData(newData);
}
}
}

0 comments on commit c01c73d

Please sign in to comment.