String[] configParts = bindingConfig.trim().split(":");
if (configParts.length < 1) {
throw new BindingConfigParseException("Tellstick binding must contain two parts separated by ':'");
}
TellstickDevice device;
try {
device = findDevice(configParts[0].trim());
} catch (SupportedMethodsException e) {
throw new BindingConfigParseException(e.getMessage());
}
validateBinding(item, configParts, device);
if (device == null) {
config.setId(Integer.valueOf(configParts[0].trim()));
} else {
config.setId(device.getId());
}
config.setValueSelector(TellstickValueSelector.getValueSelector(configParts[1].trim()));
if (configParts.length > 2 && configParts[2].trim().length() > 0) {
config.setUsageSelector(TellstickValueSelector.getValueSelector(configParts[2].trim()));