From 51ddbdb84db5364b759abca5255657a0cdf6302f Mon Sep 17 00:00:00 2001 From: mlobstein Date: Tue, 2 Mar 2021 12:21:39 -0600 Subject: [PATCH] [epsonprojector] Fix ONLINE status reporting (#10266) * Epsonprojector - Fix ONLINE status reporting * review changes Signed-off-by: Michael Lobstein --- .../internal/handler/EpsonProjectorHandler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.epsonprojector/src/main/java/org/openhab/binding/epsonprojector/internal/handler/EpsonProjectorHandler.java b/bundles/org.openhab.binding.epsonprojector/src/main/java/org/openhab/binding/epsonprojector/internal/handler/EpsonProjectorHandler.java index d9029b21d..2d8cc2ca4 100644 --- a/bundles/org.openhab.binding.epsonprojector/src/main/java/org/openhab/binding/epsonprojector/internal/handler/EpsonProjectorHandler.java +++ b/bundles/org.openhab.binding.epsonprojector/src/main/java/org/openhab/binding/epsonprojector/internal/handler/EpsonProjectorHandler.java @@ -156,10 +156,13 @@ public class EpsonProjectorHandler extends BaseThingHandler { 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());