diff --git a/tasmota/tasmota_xdrv_driver/xdrv_04_light.ino b/tasmota/tasmota_xdrv_driver/xdrv_04_light.ino index 127e036c3..e52f31783 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_04_light.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_04_light.ino @@ -1777,9 +1777,10 @@ void LightAnimate(void) // make sure we update CT range in case SetOption82 was changed Light.strip_timer_counter++; - // set sleep parameter: either settings, - // or set a maximum of PWM_MAX_SLEEP if light is on or Fade is running - if (Light.power || Light.fade_running) { + // Set a maximum sleep of PWM_MAX_SLEEP if Fade is running, or if light is on and + // a frequently updating light scheme is in use. This is to allow smooth transitions + // between light levels and colors. + if ((Settings->light_scheme > LS_POWER && Light.power) || Light.fade_running) { if (TasmotaGlobal.sleep > PWM_MAX_SLEEP) { sleep_previous = TasmotaGlobal.sleep; // save previous value of sleep TasmotaGlobal.sleep = PWM_MAX_SLEEP; // set a maximum value (in milliseconds) to sleep to ensure that animations are smooth