[knx] Fix DPT 3.007 (Control Dimming) for non -control channels (#14504)

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Also-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
Holger Friedrich 2023-02-26 12:19:15 +01:00 committed by GitHub
parent 52d77eabca
commit b023e5ac47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -888,7 +888,7 @@ public class KNXCoreTypeMapper implements KNXTypeMapper {
DPTXlator3BitControlled translator3BitControlled = (DPTXlator3BitControlled) translator;
if (translator3BitControlled.getStepCode() == 0) {
logger.debug("toType: KNX DPT_Control_Dimming: break received.");
return UnDefType.UNDEF;
return UnDefType.NULL;
}
switch (subNumber) {
case 7:
@ -897,6 +897,7 @@ public class KNXCoreTypeMapper implements KNXTypeMapper {
case 8:
return translator3BitControlled.getControlBit() ? UpDownType.DOWN : UpDownType.UP;
}
break;
case 18:
DPTXlatorSceneControl translatorSceneControl = (DPTXlatorSceneControl) translator;
int decimalValue = translatorSceneControl.getSceneNumber();

View File

@ -413,7 +413,7 @@ public class DeviceThingHandler extends AbstractKNXThingHandler {
}
}
} else {
if (type instanceof State) {
if (type instanceof State && !(type instanceof UnDefType)) {
updateState(channelUID, (State) type);
}
}