diff --git a/sonoff/xplg_wemohue.ino b/sonoff/xplg_wemohue.ino index 2f70174f0..f8eff5ddc 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("1")); + JsonObject &hue_json = jsonBuffer.parseObject(WebServer->arg((WebServer->args())-1)); if (hue_json.containsKey("on")) { response += FPSTR(HUE_LIGHT_RESPONSE_JSON);