* Following code section deals with specific mapping of values from KNX to openHAB types were the String
* received from the DPTXlator is not sufficient to set the openHAB type or has bugs
*/
switch (mainNumber) {
case 1:
DPTXlatorBoolean translatorBoolean = (DPTXlatorBoolean) translator;
switch (subNumber) {
case 8:
return translatorBoolean.getValueBoolean() ? UpDownType.DOWN:UpDownType.UP;
case 9:
return translatorBoolean.getValueBoolean() ? OpenClosedType.OPEN:OpenClosedType.CLOSED;
case 10:
return translatorBoolean.getValueBoolean() ? StopMoveType.MOVE:StopMoveType.STOP;
case 19:
return translatorBoolean.getValueBoolean() ? OpenClosedType.OPEN:OpenClosedType.CLOSED;
case 22:
return DecimalType.valueOf(translatorBoolean.getValueBoolean() ? "1": "0");
default:
return translatorBoolean.getValueBoolean() ? OnOffType.ON:OnOffType.OFF;
}
case 2:
DPTXlator1BitControlled translator1BitControlled = (DPTXlator1BitControlled) translator;
int decValue= (translator1BitControlled.getControlBit() ? 2:0) + (translator1BitControlled.getValueBit() ? 1:0) ;
return new DecimalType (decValue);