|
@@ -246,6 +246,14 @@ void MiLightHttpServer::handleUpdateGroup(const UrlTokenBindings* urlBindings) {
|
|
|
if (request["command"] == "temperature_down") {
|
|
if (request["command"] == "temperature_down") {
|
|
|
milightClient->decreaseTemperature();
|
|
milightClient->decreaseTemperature();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (request["command"] == "next_mode") {
|
|
|
|
|
+ milightClient->nextMode();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (request["command"] == "previous_mode") {
|
|
|
|
|
+ milightClient->previousMode();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (request.containsKey("hue")) {
|
|
if (request.containsKey("hue")) {
|
|
@@ -264,6 +272,10 @@ void MiLightHttpServer::handleUpdateGroup(const UrlTokenBindings* urlBindings) {
|
|
|
milightClient->updateSaturation(request["saturation"]);
|
|
milightClient->updateSaturation(request["saturation"]);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (request.containsKey("mode")) {
|
|
|
|
|
+ milightClient->updateMode(request["mode"]);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
milightClient->setResendCount(settings.packetRepeats);
|
|
milightClient->setResendCount(settings.packetRepeats);
|
|
|
|
|
|
|
|
server.send(200, "application/json", "true");
|
|
server.send(200, "application/json", "true");
|