@@ -1926,30 +1926,34 @@ bool HandleRootStatusRefresh(void) {
19261926#ifdef USE_LIGHT
19271927 uint16_t hue;
19281928 uint8_t sat;
1929+ bool hue_bri_change = false ;
19291930 int current_value = -1 ;
19301931 for (uint32_t i = 0 ; i < LST_MAX; i++) {
19311932 if (Web.slider [i] != -1 ) {
19321933 if (!Settings->flag3 .pwm_multi_channels ) { // SetOption68 0 - Enable multi-channels PWM instead of Color PWM
1933- if (0 == i) {
1934+ if (0 == i) { // Cold / Warm
19341935 current_value = LightGetColorTemp ();
19351936 }
1936- else if (1 == i) {
1937+ else if (1 == i) { // Hue
19371938 LightGetHSB (&hue, &sat, nullptr );
19381939 current_value = hue;
19391940 }
1940- else if (2 == i) {
1941+ else if (2 == i) { // Saturation
19411942 current_value = changeUIntScale (sat, 0 , 255 , 0 , 100 );
19421943 }
1943- else if (3 == i) {
1944+ else if (3 == i) { // Dimmer - Color
19441945 current_value = Settings->light_dimmer ;
19451946 }
1946- else if (4 == i) {
1947+ else if (4 == i) { // Dimmer2 - White
19471948 current_value = LightGetDimmer (2 );
19481949 }
19491950 } else {
19501951 current_value = changeUIntScale (Settings->light_color [i], 0 , 255 , 0 , 100 );
19511952 }
19521953 if (current_value != Web.slider [i]) {
1954+ if ((1 == i) || (3 == i)) { // Hue or Dimmer change needs Saturation slider gradient update
1955+ hue_bri_change = true ;
1956+ }
19531957 if (WebUpdateSliderTime ()) {
19541958 Web.slider [i] = current_value;
19551959 }
@@ -1961,6 +1965,9 @@ bool HandleRootStatusRefresh(void) {
19611965 }
19621966 }
19631967 }
1968+ if (hue_bri_change) {
1969+ WSContentSend_P (PSTR (" lc('h',99,0);" )); // Update Saturation slider color gradient when command color/dimmer is executed
1970+ }
19641971#endif // USE_LIGHT
19651972
19661973 if (msg_exec_javascript) {
0 commit comments