Skip to content

Commit

Permalink
[epsonprojector] Fix ONLINE status reporting (openhab#10266)
Browse files Browse the repository at this point in the history
* Epsonprojector - Fix ONLINE status reporting
* review changes

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Signed-off-by: John Marshall <john.marshall.au@gmail.com>
  • Loading branch information
mlobstein authored and themillhousegroup committed May 10, 2021
1 parent 90f5b16 commit fe9ff69
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,13 @@ private void updateChannelState(Channel channel) {
State state = queryDataFromDevice(epsonCommand);

if (state != null) {
updateStatus(ThingStatus.ONLINE);
if (isLinked(channel.getUID())) {
updateState(channel.getUID(), state);
}
// the first valid response will cause the thing to go ONLINE
if (state != UnDefType.UNDEF) {
updateStatus(ThingStatus.ONLINE);
}
}
} catch (IllegalArgumentException e) {
logger.warn("Unknown channel {}", channel.getUID().getId());
Expand Down

0 comments on commit fe9ff69

Please sign in to comment.