Merge PR #593: Keba: Finish action info after updating the according state
This commit is contained in:
commit
9155e4ec02
@ -460,7 +460,6 @@ void IntegrationPluginKeba::onCommandExecuted(QUuid requestId, bool success)
|
|||||||
ThingActionInfo *info = m_asyncActions.take(requestId);
|
ThingActionInfo *info = m_asyncActions.take(requestId);
|
||||||
if (success) {
|
if (success) {
|
||||||
qCDebug(dcKeba()) << "Action execution finished successfully. Request ID:" << requestId.toString();
|
qCDebug(dcKeba()) << "Action execution finished successfully. Request ID:" << requestId.toString();
|
||||||
info->finish(Thing::ThingErrorNoError);
|
|
||||||
|
|
||||||
if (thing->thingClassId() == kebaThingClassId) {
|
if (thing->thingClassId() == kebaThingClassId) {
|
||||||
// Set the value to the state so we don't have to wait for the report 2 response
|
// 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->thing()->setStateValue("power", info->action().paramValue(kebaSimplePowerActionTypeId).toBool());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info->finish(Thing::ThingErrorNoError);
|
||||||
} else {
|
} else {
|
||||||
qCWarning(dcKeba()) << "Action execution finished with error. Request ID:" << requestId.toString();
|
qCWarning(dcKeba()) << "Action execution finished with error. Request ID:" << requestId.toString();
|
||||||
info->finish(Thing::ThingErrorHardwareFailure);
|
info->finish(Thing::ThingErrorHardwareFailure);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user