Adjust Wemo/Hue

This commit is contained in:
arendst 2018-01-30 14:50:38 +01:00
parent b8f323a024
commit 2fc348cec6
1 changed files with 5 additions and 5 deletions

View File

@ -453,8 +453,7 @@ const char HUE_DESCRIPTION_XML[] PROGMEM =
"</root>\r\n" "</root>\r\n"
"\r\n"; "\r\n";
const char HUE_LIGHTS_STATUS_JSON[] PROGMEM = const char HUE_LIGHTS_STATUS_JSON[] PROGMEM =
"{\"state\":{" "{\"on\":{state},"
"\"on\":{state},"
"\"bri\":{b}," "\"bri\":{b},"
"\"hue\":{h}," "\"hue\":{h},"
"\"sat\":{s}," "\"sat\":{s},"
@ -474,7 +473,7 @@ const char HUE_GROUP0_STATUS_JSON[] PROGMEM =
"{\"name\":\"Group 0\"," "{\"name\":\"Group 0\","
"\"lights\":[{l1]," "\"lights\":[{l1],"
"\"type\":\"LightGroup\"," "\"type\":\"LightGroup\","
"\"action\":{"; "\"action\":";
// "\"scene\":\"none\","; // "\"scene\":\"none\",";
const char HueConfigResponse_JSON[] PROGMEM = const char HueConfigResponse_JSON[] PROGMEM =
"{\"name\":\"Philips hue\"," "{\"name\":\"Philips hue\","
@ -588,7 +587,7 @@ void HueGlobalConfig(String *path)
response = F("{\"lights\":{\""); response = F("{\"lights\":{\"");
for (uint8_t i = 1; i <= maxhue; i++) { for (uint8_t i = 1; i <= maxhue; i++) {
response += i; response += i;
response += F("\":"); response += F("\":{\"state\":");
HueLightStatus1(i, &response); HueLightStatus1(i, &response);
HueLightStatus2(i, &response); HueLightStatus2(i, &response);
if (i < maxhue) { if (i < maxhue) {
@ -633,7 +632,7 @@ void HueLights(String *path)
response = "{\""; response = "{\"";
for (uint8_t i = 1; i <= maxhue; i++) { for (uint8_t i = 1; i <= maxhue; i++) {
response += i; response += i;
response += F("\":"); response += F("\":{\"state\":");
HueLightStatus1(i, &response); HueLightStatus1(i, &response);
HueLightStatus2(i, &response); HueLightStatus2(i, &response);
if (i < maxhue) { if (i < maxhue) {
@ -752,6 +751,7 @@ void HueLights(String *path)
if ((device < 1) || (device > maxhue)) { if ((device < 1) || (device > maxhue)) {
device = 1; device = 1;
} }
response += F("{\"state\":");
HueLightStatus1(device, &response); HueLightStatus1(device, &response);
HueLightStatus2(device, &response); HueLightStatus2(device, &response);
WebServer->send(200, FPSTR(HDR_CTYPE_JSON), response); WebServer->send(200, FPSTR(HDR_CTYPE_JSON), response);