use of org.openhab.binding.fht.FHTBindingProvider in project openhab1-addons by openhab.
the class FHTBinding method internalReceiveCommand.
/**
* @{inheritDoc
*/
@Override
protected void internalReceiveCommand(String itemName, Command command) {
if (!checkCULDevice()) {
return;
}
logger.debug("internalReceiveCommand() is called!");
FHTBindingConfig config = null;
for (FHTBindingProvider provider : providers) {
config = provider.getConfigByItemName(itemName);
if (config != null) {
break;
}
}
if (config != null) {
if (Datapoint.DESIRED_TEMP == config.getDatapoint() && command instanceof DecimalType) {
setDesiredTemperature(config, (DecimalType) command);
} else if (Datapoint.VALVE == config.getDatapoint() && command instanceof DecimalType) {
setValvePosition(config, (DecimalType) command);
} else {
logger.error("You can only manipulate the desired temperature or valve position via commands, all other data points are read only");
}
}
}
Aggregations