use of org.openhab.binding.homematic.internal.model.adapter.ValueListAdapter in project openhab1-addons by openhab.
the class ConverterTest method getValueListVariable.
private HmVariable getValueListVariable(Object value, String valueList) throws Exception {
HmVariable var = new HmVariable();
FieldUtils.writeField(var, "name", "Var", true);
FieldUtils.writeField(var, "valueType", 16, true);
FieldUtils.writeField(var, "subType", 29, true);
Object convertedValueList = new ValueListAdapter().unmarshal(valueList == null ? null : valueList.toString());
FieldUtils.writeField(var, "valueList", convertedValueList, true);
var.setValue(value);
return var;
}
Aggregations