Skip to content

Commit

Permalink
[insteon] Fix led command stack overflow error (#17977)
Browse files Browse the repository at this point in the history
Signed-off-by: jsetton <[email protected]>
  • Loading branch information
jsetton authored Dec 26, 2024
1 parent c31bcb2 commit bbdf3e3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit bbdf3e3

Please sign in to comment.