[epsonprojector] Fix ONLINE status reporting (#10266)
* Epsonprojector - Fix ONLINE status reporting * review changes Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
This commit is contained in:
parent
037bfa77ea
commit
51ddbdb84d
|
@ -156,10 +156,13 @@ public class EpsonProjectorHandler extends BaseThingHandler {
|
||||||
State state = queryDataFromDevice(epsonCommand);
|
State state = queryDataFromDevice(epsonCommand);
|
||||||
|
|
||||||
if (state != null) {
|
if (state != null) {
|
||||||
updateStatus(ThingStatus.ONLINE);
|
|
||||||
if (isLinked(channel.getUID())) {
|
if (isLinked(channel.getUID())) {
|
||||||
updateState(channel.getUID(), state);
|
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) {
|
} catch (IllegalArgumentException e) {
|
||||||
logger.warn("Unknown channel {}", channel.getUID().getId());
|
logger.warn("Unknown channel {}", channel.getUID().getId());
|
||||||
|
|
Loading…
Reference in New Issue