} else if (valueSelector == RFXComValueSelector.HUMIDITY) {
state = new DecimalType(humidity);
} else {
throw new RFXComException("Can't convert "
+ valueSelector + " to NumberItem");
}
} else if (valueSelector.getItemClass() == StringItem.class) {
if (valueSelector == RFXComValueSelector.RAW_DATA) {
state = new StringType(
DatatypeConverter.printHexBinary(rawMessage));
} else if (valueSelector == RFXComValueSelector.HUMIDITY_STATUS) {
state = new StringType(humidityStatus.toString());
} else {
throw new RFXComException("Can't convert " + valueSelector + " to StringItem");
}
} else {
throw new RFXComException("Can't convert " + valueSelector
+ " to " + valueSelector.getItemClass());
}
return state;