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>
  • Loading branch information
mlobstein authored Mar 2, 2021
1 parent 1cc2155 commit 552727a
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 552727a

Please sign in to comment.