diff --git a/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/feature/CommandHandler.java b/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/feature/CommandHandler.java index 694178877b066..4fbb396a79f2f 100644 --- a/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/feature/CommandHandler.java +++ b/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/feature/CommandHandler.java @@ -1460,8 +1460,8 @@ private int getLevel(Command cmd) { } private void setLEDOnOff(InsteonChannelConfiguration config, Command cmd) { - State state = getInsteonDevice().getFeatureState(FEATURE_LED_ON_OFF); - if (!((State) cmd).equals(state)) { + DeviceFeature feature = getInsteonDevice().getFeature(FEATURE_LED_ON_OFF); + if (feature != null) { feature.handleCommand(config, cmd); } } @@ -2187,8 +2187,8 @@ protected Msg getIMMessage(Command cmd) throws InvalidMessageTypeException, Fiel } private void setLEDControl(InsteonChannelConfiguration config) { - State state = getInsteonModem().getFeatureState(FEATURE_LED_CONTROL); - if (!OnOffType.ON.equals(state)) { + DeviceFeature feature = getInsteonModem().getFeature(FEATURE_LED_CONTROL); + if (feature != null) { feature.handleCommand(config, OnOffType.ON); } }