]> git.basschouten.com Git - openhab-addons.git/commitdiff
[remoteopenhab] Handle REFRESH command as any command (#13350)
authorlolodomo <lg.hc@free.fr>
Mon, 5 Sep 2022 15:54:27 +0000 (17:54 +0200)
committerGitHub <noreply@github.com>
Mon, 5 Sep 2022 15:54:27 +0000 (17:54 +0200)
The received command (REFRESH) is transmitted as a REFRESH command to
the remote item.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
bundles/org.openhab.binding.remoteopenhab/src/main/java/org/openhab/binding/remoteopenhab/internal/handler/RemoteopenhabBridgeHandler.java

index 57e46e39521429dcc4defa23638f58deeaeb8212..8729f8f703243e3bf8ee4fcad3ba6368e4417649 100644 (file)
@@ -75,7 +75,6 @@ import org.openhab.core.thing.type.ChannelTypeBuilder;
 import org.openhab.core.thing.type.ChannelTypeUID;
 import org.openhab.core.types.Command;
 import org.openhab.core.types.CommandOption;
-import org.openhab.core.types.RefreshType;
 import org.openhab.core.types.State;
 import org.openhab.core.types.StateDescriptionFragmentBuilder;
 import org.openhab.core.types.StateOption;
@@ -201,10 +200,7 @@ public class RemoteopenhabBridgeHandler extends BaseBridgeHandler
         }
 
         try {
-            if (command instanceof RefreshType) {
-                String state = restClient.getRemoteItemState(channelUID.getId());
-                updateChannelState(channelUID.getId(), null, state, false);
-            } else if (isLinked(channelUID)) {
+            if (isLinked(channelUID)) {
                 restClient.sendCommandToRemoteItem(channelUID.getId(), command);
                 String commandStr = command.toFullString();
                 logger.debug("Sending command {} to remote item {} succeeded",