mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-02-04 03:14:07 +01:00
[lcn] Fix initial polling of linked Channels (#9103)
Fixes #9086 Relates to openhab/openhab-core#1707 Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
This commit is contained in:
parent
fb7fcd886d
commit
417ae41bd9
@ -140,6 +140,13 @@ public class LcnModuleHandler extends BaseThingHandler {
|
|||||||
|
|
||||||
// module is assumed as online, when the corresponding Bridge (PckGatewayHandler) is online.
|
// module is assumed as online, when the corresponding Bridge (PckGatewayHandler) is online.
|
||||||
updateStatus(ThingStatus.ONLINE);
|
updateStatus(ThingStatus.ONLINE);
|
||||||
|
|
||||||
|
// trigger REFRESH commands for all linked Channels to start polling
|
||||||
|
getThing().getChannels().forEach(channel -> {
|
||||||
|
if (isLinked(channel.getUID())) {
|
||||||
|
channelLinked(channel.getUID());
|
||||||
|
}
|
||||||
|
});
|
||||||
} catch (LcnException e) {
|
} catch (LcnException e) {
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, e.getMessage());
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, e.getMessage());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user