/* respond to device */
if (isBroadcast == false)
this.messageHandler.sendAck(setTempMsg);
break;
case THERMOSTAT_STATE:
ThermostatStateMsg thermStateMsg = new ThermostatStateMsg(data);
thermStateMsg.printMessage();
for (MaxCulBindingProvider provider : super.providers) {
Collection<MaxCulBindingConfig> bindingConfigs = provider
.getConfigsForRadioAddr(thermStateMsg.srcAddrStr);
for (MaxCulBindingConfig bc : bindingConfigs) {
String itemName = provider.getItemNameForConfig(bc);
if (bc.getFeature() == MaxCulFeature.THERMOSTAT
&& thermStateMsg.getDesiredTemperature() != null) {
eventPublisher.postUpdate(
itemName,
new DecimalType(thermStateMsg
.getDesiredTemperature()));
} else if (bc.getFeature() == MaxCulFeature.TEMPERATURE
&& thermStateMsg.getMeasuredTemperature() != null) {
eventPublisher.postUpdate(
itemName,
new DecimalType(thermStateMsg
.getMeasuredTemperature()));
} else if (bc.getFeature() == MaxCulFeature.BATTERY) {
eventPublisher.postUpdate(itemName, thermStateMsg
.getBatteryLow() ? OnOffType.ON
: OnOffType.OFF);
} else if (bc.getFeature() == MaxCulFeature.MODE) {
eventPublisher.postUpdate(itemName,
new DecimalType(thermStateMsg
.getControlMode().toInt()));
} else if (bc.getFeature() == MaxCulFeature.VALVE_POS) {
eventPublisher
.postUpdate(itemName, new DecimalType(
thermStateMsg.getValvePos()));
}
// TODO switch mode between manual/automatic?
}
}
/* respond to device */