Merge PR #593: Keba: Finish action info after updating the according state

master
jenkins 2022-08-25 15:06:55 +02:00
commit 9155e4ec02
1 changed files with 2 additions and 1 deletions

View File

@ -460,7 +460,6 @@ void IntegrationPluginKeba::onCommandExecuted(QUuid requestId, bool success)
ThingActionInfo *info = m_asyncActions.take(requestId);
if (success) {
qCDebug(dcKeba()) << "Action execution finished successfully. Request ID:" << requestId.toString();
info->finish(Thing::ThingErrorNoError);
if (thing->thingClassId() == kebaThingClassId) {
// Set the value to the state so we don't have to wait for the report 2 response
@ -479,6 +478,8 @@ void IntegrationPluginKeba::onCommandExecuted(QUuid requestId, bool success)
info->thing()->setStateValue("power", info->action().paramValue(kebaSimplePowerActionTypeId).toBool());
}
}
info->finish(Thing::ThingErrorNoError);
} else {
qCWarning(dcKeba()) << "Action execution finished with error. Request ID:" << requestId.toString();
info->finish(Thing::ThingErrorHardwareFailure);