String strValue = ObjectUtils.toString(value);
if (hmValueItem.isStringValue()) {
strValue = "\"" + strValue + "\"";
}
logger.debug("Sending {} with value '{}' to CCU", hmValueItem.getName(), strValue);
HmResult result = sendScriptByName("setVariable", HmResult.class, new String[] { "variable_name",
"variable_state" }, new String[] { hmValueItem.getName(), strValue });
if (!result.isValid()) {
throw new HomematicClientException("Unable to set CCU variable " + hmValueItem.getName());
}
}