Fixing action execution value update

master
Simon Stürz 2021-06-10 14:07:11 +02:00 committed by Michael Zanetti
parent b79a055f48
commit 9f8beae620
1 changed files with 2 additions and 0 deletions

View File

@ -288,6 +288,7 @@ void IntegrationPluginMTec::executeAction(ThingActionInfo *info)
reply->deleteLater(); reply->deleteLater();
if (reply->error() == QModbusDevice::NoError) { if (reply->error() == QModbusDevice::NoError) {
qCDebug(dcMTec()) << "Setting target temperature" << targetTemperature << "°C" << "finished successfully"; qCDebug(dcMTec()) << "Setting target temperature" << targetTemperature << "°C" << "finished successfully";
thing->setStateValue(mtecTargetTemperatureStateTypeId, targetTemperature);
info->finish(Thing::ThingErrorNoError); info->finish(Thing::ThingErrorNoError);
} else { } else {
info->finish(Thing::ThingErrorHardwareFailure); info->finish(Thing::ThingErrorHardwareFailure);
@ -313,6 +314,7 @@ void IntegrationPluginMTec::executeAction(ThingActionInfo *info)
reply->deleteLater(); reply->deleteLater();
if (reply->error() == QModbusDevice::NoError) { if (reply->error() == QModbusDevice::NoError) {
qCDebug(dcMTec()) << "Setting smart home energy" << energy << "W" << "finished successfully"; qCDebug(dcMTec()) << "Setting smart home energy" << energy << "W" << "finished successfully";
thing->setStateValue(mtecSmartHomeEnergyStateTypeId, energy);
info->finish(Thing::ThingErrorNoError); info->finish(Thing::ThingErrorNoError);
} else { } else {
info->finish(Thing::ThingErrorHardwareFailure); info->finish(Thing::ThingErrorHardwareFailure);