From 06cc70aaf4f38c2edb14e17c3635e9cce7a65bca Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Fri, 26 Oct 2018 19:01:36 -0300 Subject: [PATCH] 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. --- sonoff/xplg_wemohue.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/xplg_wemohue.ino b/sonoff/xplg_wemohue.ino index f8eff5ddc..2f70174f0 100644 --- a/sonoff/xplg_wemohue.ino +++ b/sonoff/xplg_wemohue.ino @@ -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);