Skip to content

Commit 4244d68

Browse files
jsettonjlaur
authored andcommitted
[insteon] Fix led command stack overflow error (openhab#17977)
Signed-off-by: jsetton <[email protected]>
1 parent 5f64b85 commit 4244d68

File tree

1 file changed

+4
-4
lines changed
  • bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/feature

1 file changed

+4
-4
lines changed

bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/feature/CommandHandler.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1460,8 +1460,8 @@ private int getLevel(Command cmd) {
14601460
}
14611461

14621462
private void setLEDOnOff(InsteonChannelConfiguration config, Command cmd) {
1463-
State state = getInsteonDevice().getFeatureState(FEATURE_LED_ON_OFF);
1464-
if (!((State) cmd).equals(state)) {
1463+
DeviceFeature feature = getInsteonDevice().getFeature(FEATURE_LED_ON_OFF);
1464+
if (feature != null) {
14651465
feature.handleCommand(config, cmd);
14661466
}
14671467
}
@@ -2187,8 +2187,8 @@ protected Msg getIMMessage(Command cmd) throws InvalidMessageTypeException, Fiel
21872187
}
21882188

21892189
private void setLEDControl(InsteonChannelConfiguration config) {
2190-
State state = getInsteonModem().getFeatureState(FEATURE_LED_CONTROL);
2191-
if (!OnOffType.ON.equals(state)) {
2190+
DeviceFeature feature = getInsteonModem().getFeature(FEATURE_LED_CONTROL);
2191+
if (feature != null) {
21922192
feature.handleCommand(config, OnOffType.ON);
21932193
}
21942194
}

0 commit comments

Comments
 (0)