Search in sources :

Example 1 with ValueListAdapter

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;
}
Also used : HmVariable(org.openhab.binding.homematic.internal.model.HmVariable) ValueListAdapter(org.openhab.binding.homematic.internal.model.adapter.ValueListAdapter)

Aggregations

HmVariable (org.openhab.binding.homematic.internal.model.HmVariable)1 ValueListAdapter (org.openhab.binding.homematic.internal.model.adapter.ValueListAdapter)1