Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private static String normalizeDescriptor(String descriptor) {
result = result.replace("-setpointhc", "-setpoint-hc");
result = result.replace("setphc", "-setpoint-hc");

return result;
return sanetizeId(result);
}

/**
Expand All @@ -142,18 +142,18 @@ private static String normalizeDescriptor(String descriptor) {
public static ChannelTypeUID generateChannelTypeUID(SiemensHvacMetadataDataPoint dpt) throws SiemensHvacException {
String type = dpt.getDptType();
String shortDesc = dpt.getShortDescEn();
String result = normalizeDescriptor(shortDesc);
String channelTypeId = normalizeDescriptor(shortDesc);

try {
TypeConverter tp = ConverterFactory.getConverter(type);
if (!tp.hasVariant()) {
result = tp.getChannelType(dpt);
channelTypeId = tp.getChannelType(dpt);
}
} catch (ConverterTypeException ex) {
throw new SiemensHvacException(String.format("Can't find converter for type: %s", type), ex);
}

return new ChannelTypeUID(SiemensHvacBindingConstants.BINDING_ID, result);
return new ChannelTypeUID(SiemensHvacBindingConstants.BINDING_ID, channelTypeId);
}

/**
Expand Down