You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//first check if this device is not the scene code!
2716
2725
result = m_sql.safe_query("SELECT Activators, SceneType FROM Scenes WHERE (ID=='%q')", idx.c_str());
@@ -2742,8 +2751,14 @@ namespace http {
2742
2751
}
2743
2752
}
2744
2753
//first check if it is not already a part of this scene/group (with the same OnDelay)
2745
-
result = m_sql.safe_query("SELECT ID FROM SceneDevices WHERE (DeviceRowID=='%q') AND (SceneRowID =='%q') AND (OnDelay == %d)",
2746
-
devidx.c_str(), idx.c_str(), ondelay);
2754
+
if (isscene == "true") {
2755
+
result = m_sql.safe_query("SELECT ID FROM SceneDevices WHERE (DeviceRowID=='%q') AND (SceneRowID =='%q') AND (OnDelay == %d) AND (OffDelay == %d) AND (Cmd == %d)",
int level = atoi(m_pWebEm->FindValue("level").c_str());
2810
2820
int hue = atoi(m_pWebEm->FindValue("hue").c_str());
@@ -2948,7 +2958,7 @@ namespace http {
2948
2958
root["title"] = "GetSceneDevices";
2949
2959
2950
2960
std::vector<std::vector<std::string> > result;
2951
-
result = m_sql.safe_query("SELECT a.ID, b.Name, a.DeviceRowID, b.Type, b.SubType, b.nValue, b.sValue, a.Cmd, a.Level, b.ID, a.[Order], a.Hue, a.OnDelay, a.OffDelay FROM SceneDevices a, DeviceStatus b WHERE (a.SceneRowID=='%q') AND (b.ID == a.DeviceRowID) ORDER BY a.[Order]",
2961
+
result = m_sql.safe_query("SELECT a.ID, b.Name, a.DeviceRowID, b.Type, b.SubType, b.nValue, b.sValue, a.Cmd, a.Level, b.ID, a.[Order], a.Hue, a.OnDelay, a.OffDelay, b.SwitchType FROM SceneDevices a, DeviceStatus b WHERE (a.SceneRowID=='%q') AND (b.ID == a.DeviceRowID) ORDER BY a.[Order]",
0 commit comments