Fixing action execution value update
This commit is contained in:
parent
b79a055f48
commit
9f8beae620
@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user