Update RestApi.h, Bugfix JSON-Param Reset-Command

Bugfix JSON-Param Reset-Command
This commit is contained in:
sri-elgora 2023-05-11 14:11:10 +02:00 committed by GitHub
parent dbb352801e
commit a0955044e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -553,7 +553,7 @@ class RestApi {
if(F("power") == jsonIn[F("cmd")]) if(F("power") == jsonIn[F("cmd")])
accepted = iv->setDevControlRequest((jsonIn[F("val")] == 1) ? TurnOn : TurnOff); accepted = iv->setDevControlRequest((jsonIn[F("val")] == 1) ? TurnOn : TurnOff);
else if(F("restart") == jsonIn[F("restart")]) else if(F("restart") == jsonIn[F("cmd")])
accepted = iv->setDevControlRequest(Restart); accepted = iv->setDevControlRequest(Restart);
else if(0 == strncmp("limit_", jsonIn[F("cmd")].as<const char*>(), 6)) { else if(0 == strncmp("limit_", jsonIn[F("cmd")].as<const char*>(), 6)) {
iv->powerLimit[0] = jsonIn["val"]; iv->powerLimit[0] = jsonIn["val"];