From f8ef8e51ac8fab6573b98745c07207dd6828eb93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Wed, 10 Aug 2022 12:43:26 +0200 Subject: [PATCH] Keba: Finish action info after updating the according state --- keba/integrationpluginkeba.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keba/integrationpluginkeba.cpp b/keba/integrationpluginkeba.cpp index 24306474..5f421ed3 100644 --- a/keba/integrationpluginkeba.cpp +++ b/keba/integrationpluginkeba.cpp @@ -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);