Strange behaviour of handleCommand function in my plugin

Hello,
I am using the follwoing code in the plugin yioremote for handling the switch command

@Override
    public void handleCommand(ChannelUID channelUID, Command command) {
        if (RECEIVER_SWITCH_CHANNEL.equals(channelUID.getIdWithoutGroup())) {
            switch (yioRemoteDockActualStatus) {
                case AUTHENTICATION_COMPLETE:
                case SEND_PING:
                case CHECK_PONG:
                    if (command == OnOffType.ON) {
                        logger.debug("YIODOCKRECEIVERSWITCH ON procedure: Switching IR Receiver on");
                        sendMessage(YioRemoteMessages.IR_RECEIVER_ON, "");
                    } else if (command == OnOffType.OFF) {
                        logger.debug("YIODOCKRECEIVERSWITCH OFF procedure: Switching IR Receiver off");
                        sendMessage(YioRemoteMessages.IR_RECEIVER_OFF, "");
                    } else {
                        logger.debug("YIODOCKRECEIVERSWITCH no procedure");
                    }
                    break;
                default:
                    break;
            }
        }
    }

But this is only fired by switching the switch to “ON” . If I switch the switch to “OFF” ithis is never fired?

Any suggestion wht the issue is?

Thanks

Do you see the command in your events.log? There is a UI bug that gives exactly this effect.

@rossko57 it is running in M3 :slight_smile: But not in the eclipse runtime …

I never got openHAB running reliably in Eclipse for debugging. I use a local openHAB instance with remote debugging. I guess you can do the same with Eclipse (I’m using IntelliJ IDEA).