Skip to content

Commit

Permalink
[remoteopenhab] Handle REFRESH command as any command (#13350)
Browse files Browse the repository at this point in the history
The received command (REFRESH) is transmitted as a REFRESH command to
the remote item.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo authored Sep 5, 2022
1 parent 5a11f14 commit bbaf1e7
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
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;
Expand Down Expand Up @@ -201,10 +200,7 @@ public void handleCommand(ChannelUID channelUID, Command command) {
}

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",
Expand Down

0 comments on commit bbaf1e7

Please sign in to comment.