@Override
public void handleCommand(ChannelUID channelUID, Command command) {
- logger.debug("channel {} was triggered with the command {}", channelUID.getAsString(), command);
+ if (ThingStatus.ONLINE.equals(getThing().getStatus())) {
+ logger.debug("channel {} was triggered with the command {}", channelUID.getAsString(), command);
- getInsteonBinding().sendCommand(channelUID.getAsString(), command);
+ getInsteonBinding().sendCommand(channelUID.getAsString(), command);
+ } else {
+ logger.debug("the command {} for channel {} was ignored because the thing is not ONLINE", command,
+ channelUID.getAsString());
+ }
}
@Override