Fix Alexa for ALL cores

Alexa uses Phillips Hue Emulation to control Tasmota.

With this fix, the webserver arguments are passed to Tasmota as keys instead of args solving the Alexa issue for ALL cores.

Besides, for core 2.6.0 is planned to deprecate the use of args in favor of keys.

This fix makes Alexa to works compiling Tasmota under core 2.3.0, 2.4.0, 2.4.1, 2.4.2, 2.5.0 (stage), 2.6.0 (planned)

Tested Ok.
This commit is contained in:
Adrian Scillato 2018-10-26 19:01:36 -03:00 committed by GitHub
parent 77d54be267
commit 06cc70aaf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -664,7 +664,7 @@ void HueLights(String *path)
response = "[";
StaticJsonBuffer<400> jsonBuffer;
JsonObject &hue_json = jsonBuffer.parseObject(WebServer->arg((WebServer->args())-1));
JsonObject &hue_json = jsonBuffer.parseObject(WebServer->arg("1"));
if (hue_json.containsKey("on")) {
response += FPSTR(HUE_LIGHT_RESPONSE_JSON);