Fix store, read and add scene order
@@ -5458,7 +5458,7 @@ void DeRestPluginPrivate::foundScene(LightNode *lightNode, Group *group, uint8_t
scene.name.sprintf("Scene %u", sceneId);
}
group->scenes.push_back(scene);
- updateEtag(group->etag);
+ updateGroupEtag(group);
updateEtag(gwConfigEtag);
queSaveDb(DB_SCENES, DB_SHORT_SAVE_DELAY);
}
@@ -6524,6 +6524,15 @@ void DeRestPluginPrivate::processGroupTasks()
}
}
+ for (const TaskItem &task : runningTasks)
+ {
+ if (task.taskType == TaskAddScene || task.taskType == TaskStoreScene)
+ {
+ // wait till tasks are processed
+ return;
+ }
+ }
+
if (!i->modifyScenes.empty())
{
if (i->modifyScenesRetries < GroupInfo::MaxActionRetries)
