diff --git a/src/cmnds/cmd_newLEDDriver.c b/src/cmnds/cmd_newLEDDriver.c index e37276b19..967e3eeb4 100644 --- a/src/cmnds/cmd_newLEDDriver.c +++ b/src/cmnds/cmd_newLEDDriver.c @@ -1141,10 +1141,10 @@ void LED_GetFinalChannels100(byte *rgbcw) { rgbcw[3] = finalColors[3] * (100.0f / 255.0f); rgbcw[4] = finalColors[4] * (100.0f / 255.0f); } -void LED_GetFinalHSV(int *hsv) { +void LED_GetTasmotaHSV(int *hsv) { hsv[0] = g_hsv_h; - hsv[1] = g_hsv_s; - hsv[2] = g_hsv_v; + hsv[1] = g_hsv_s * 100; + hsv[2] = g_hsv_v * 100; } void LED_GetFinalRGBCW(byte *rgbcw) { rgbcw[0] = finalColors[0]; diff --git a/src/cmnds/cmd_public.h b/src/cmnds/cmd_public.h index b4eb1ed4a..12801ede0 100644 --- a/src/cmnds/cmd_public.h +++ b/src/cmnds/cmd_public.h @@ -209,7 +209,7 @@ void LED_SetFinalCW(byte c, byte w); void LED_SetFinalRGB(byte r, byte g, byte b); void LED_SetFinalRGBCW(byte* rgbcw); void LED_GetFinalChannels100(byte* rgbcw); -void LED_GetFinalHSV(int* hsv); +void LED_GetTasmotaHSV(int* hsv); void LED_GetFinalRGBCW(byte* rgbcw); // color indices are as in Tasmota void LED_SetColorByIndex(int index); diff --git a/src/httpserver/json_interface.c b/src/httpserver/json_interface.c index 437e9f4fa..73658d729 100644 --- a/src/httpserver/json_interface.c +++ b/src/httpserver/json_interface.c @@ -112,7 +112,7 @@ static int http_tasmota_json_power(void* request, jsonCb_t printer) { byte channels[5]; LED_GetFinalRGBCW(rgbcw); - LED_GetFinalHSV(hsv); + LED_GetTasmotaHSV(hsv); LED_GetFinalChannels100(channels); // it looks like they include C and W in color @@ -862,7 +862,7 @@ int JSON_ProcessCommandReply(const char* cmd, const char* arg, void* request, js MQTT_PublishPrinterContentsToStat((struct obk_mqtt_publishReplyPrinter_s*)request, "RESULT"); } } - else if (!wal_strnicmp(cmd, "Color", 5)) { + else if (!wal_strnicmp(cmd, "Color", 5) || !wal_strnicmp(cmd, "HsbColor", 8)) { printer(request, "{"); //if (*arg == 0) { // http_tasmota_json_Colo(request, printer);