From bbdf3e347994e16bc14c1b88e508590f77663f69 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 26 Dec 2024 17:54:24 -0500 Subject: [PATCH] [insteon] Fix led command stack overflow error (#17977) Signed-off-by: jsetton --- .../insteon/internal/device/feature/CommandHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } }