Skip to content

Commit

Permalink
[knx] fix DPT 3.007 for non -control channels (#162)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
  • Loading branch information
J-N-K committed Jul 18, 2021
1 parent db2422e commit d59fa20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,16 @@ private KNXCoreTypeMapper() {
DPTXlator3BitControlled translator3BitControlled = (DPTXlator3BitControlled) translator;
if (translator3BitControlled.getStepCode() == 0) {
LOGGER.debug("convertRawDataToType: KNX DPT_Control_Dimming: break received.");
return UnDefType.UNDEF;
return UnDefType.NULL;
}
switch (m.group("sub")) {
case "7":
case "007":
return translator3BitControlled.getControlBit() ? IncreaseDecreaseType.INCREASE
: IncreaseDecreaseType.DECREASE;
case "8":
case "008":
return translator3BitControlled.getControlBit() ? UpDownType.DOWN : UpDownType.UP;
}
break;
case "18":
DPTXlatorSceneControl translatorSceneControl = (DPTXlatorSceneControl) translator;
int decimalValue = translatorSceneControl.getSceneNumber();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ private void processDataReceived(GroupAddress destination, byte[] asdu, InboundS
}
}
} else {
if (value instanceof State) {
if (value instanceof State && !(value instanceof UnDefType)) {
updateState(knxChannel.getChannelUID(), (State) value);
}
}
Expand Down

0 comments on commit d59fa20

Please sign in to comment.