Skip to content

Commit 24b0e04

Browse files
committed
Fixed Philips Hue Scene activation (caused by Selector Switch Implementation)
1 parent 077b726 commit 24b0e04

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

main/WebServer.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10991,14 +10991,14 @@ namespace http {
1099110991

1099210992
std::vector<std::vector<std::string> > result;
1099310993

10994-
result=m_sql.safe_query("SELECT Type,SubType FROM DeviceStatus WHERE (ID == '%q')",
10995-
idx.c_str());
10994+
result=m_sql.safe_query("SELECT Type,SubType,HardwareID FROM DeviceStatus WHERE (ID == '%q')", idx.c_str());
1099610995
if (result.size()<1)
1099710996
return;
1099810997
std::vector<std::string> sd = result[0];
1099910998

1100010999
unsigned char dType=atoi(sd[0].c_str());
1100111000
//unsigned char dSubType=atoi(sd[1].c_str());
11001+
//int HwdID = atoi(sd[2].c_str());
1100211002

1100311003
int nEvoMode=0;
1100411004

@@ -11173,7 +11173,10 @@ namespace http {
1117311173
}
1117411174

1117511175
// Save device options
11176-
m_sql.SetDeviceOptions(ullidx, m_sql.BuildDeviceOptions(sOptions, false));
11176+
if (!sOptions.empty())
11177+
{
11178+
m_sql.SetDeviceOptions(ullidx, m_sql.BuildDeviceOptions(sOptions, false));
11179+
}
1117711180

1117811181
if (maindeviceidx != "")
1117911182
{

0 commit comments

Comments
 (0)