[hdpowerview] Let the framework change the child Thing statuses (#12330)

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
This commit is contained in:
Fabian Wolter 2022-02-23 15:23:19 +01:00 committed by GitHub
parent 579bc70f6e
commit 223c9f929b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 12 deletions

View File

@ -164,6 +164,7 @@ public class HDPowerViewHubHandler extends BaseBridgeHandler {
return; return;
} }
updateStatus(ThingStatus.UNKNOWN);
pendingShadeInitializations.clear(); pendingShadeInitializations.clear();
webTargets = new HDPowerViewWebTargets(httpClient, host); webTargets = new HDPowerViewWebTargets(httpClient, host);
refreshInterval = config.refresh; refreshInterval = config.refresh;

View File

@ -82,12 +82,9 @@ public class HDPowerViewRepeaterHandler extends AbstractHubbedThingHandler {
"@text/offline.conf-error.invalid-bridge-handler"); "@text/offline.conf-error.invalid-bridge-handler");
return; return;
} }
ThingStatus bridgeStatus = bridge.getStatus();
if (bridgeStatus == ThingStatus.ONLINE) { updateStatus(ThingStatus.UNKNOWN);
updateStatus(ThingStatus.UNKNOWN);
} else {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
}
scheduleRefreshJob(); scheduleRefreshJob();
} }

View File

@ -109,12 +109,7 @@ public class HDPowerViewShadeHandler extends AbstractHubbedThingHandler {
"@text/offline.conf-error.invalid-bridge-handler"); "@text/offline.conf-error.invalid-bridge-handler");
return; return;
} }
ThingStatus bridgeStatus = bridge.getStatus(); updateStatus(ThingStatus.UNKNOWN);
if (bridgeStatus == ThingStatus.ONLINE) {
updateStatus(ThingStatus.UNKNOWN);
} else {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
}
} }
@Override @Override