diff --git a/tasmota/CHANGELOG.md b/tasmota/CHANGELOG.md index c639e5392..1706dbbb3 100644 --- a/tasmota/CHANGELOG.md +++ b/tasmota/CHANGELOG.md @@ -4,6 +4,7 @@ - Fix lost functionality of GPIO9 and GPIO10 on some devices (#7080) - Fix Zigbee uses Hardware Serial if GPIO 1/3 or GPIO 13/15 and SerialLog 0 (#7071) +- Fix WS2812 power control (#7090) - Change light color schemes 2, 3 and 4 from color wheel to Hue driven ## Released diff --git a/tasmota/xdrv_04_light.ino b/tasmota/xdrv_04_light.ino index 0ef3f1ea9..7f1e66fc6 100644 --- a/tasmota/xdrv_04_light.ino +++ b/tasmota/xdrv_04_light.ino @@ -1571,6 +1571,7 @@ void LightAnimate(void) { uint8_t cur_col[LST_MAX]; uint16_t light_still_on = 0; + bool power_off = false; Light.strip_timer_counter++; if (!Light.power) { // All channels powered off @@ -1578,6 +1579,9 @@ void LightAnimate(void) if (!Light.fade_running) { sleep = Settings.sleep; } + if (Settings.light_scheme >= LS_MAX) { + power_off = true; + } } else { if (Settings.sleep > PWM_MAX_SLEEP) { sleep = PWM_MAX_SLEEP; // set a maxumum value of 50 milliseconds to ensure that animations are smooth @@ -1629,7 +1633,7 @@ void LightAnimate(void) } } - if (Settings.light_scheme < LS_MAX) { // exclude WS281X Neopixel + if ((Settings.light_scheme < LS_MAX) || power_off) { // exclude WS281X Neopixel schemes // Apply power modifiers to Light.new_color LightApplyPower(Light.new_color, Light.power); @@ -1714,7 +1718,7 @@ void LightAnimate(void) cur_col_10bits[i] = orig_col_10bits[Light.color_remap[i]]; } - if (!Settings.light_fade) { // no fade + if (!Settings.light_fade || power_off) { // no fade // record the current value for a future Fade memcpy(Light.fade_start_8, cur_col, sizeof(Light.fade_start_8)); memcpy(Light.fade_start_10, cur_col_10bits, sizeof(Light.fade_start_10));