RGBCCT Leds Turn Effect Off When White is Selected

Hi Guys,

I’m looking for some guidance with my rgbcct led strips run from the ESPThings ET-AL01 controller.

I have a sketch working with a slow rainbow effect, but when I select either of the white leds the white leds stay On for the transition time of the slow rainbow effect, then reveret back to changing colour.

What I’d like to achieve is once the white leds are selected, this will disable the effect and the leds will stay white until I select back to colour. I thought color interlock would resolve this, but it hasn’t. The end use will at some point have sensors to detect a person to engage the white leds On, then after no person is detected switch back to colour.
I’m currently switching between colour and white through the HA interface.

I’ve read-up to a degree on the lighrt-turn-on and off, but not quite sure how to implement it regarding cw and ww lights being On to disable the effect?

Can I ask for some help with this please.

Heres what I currently have after the board info and passwords;

sensor:
  - platform: wifi_signal
    name: "WiFi Signal $devicename"
    update_interval: 60s
output:
  - platform: ledc
    pin: 26
    frequency: 25000Hz
    id: ledc_cw
  - platform: ledc
    pin: 18
    frequency: 25000Hz
    id: ledc_ww
  - platform: ledc
    pin: 19
    frequency: 25000Hz
    id: ledc_r
  - platform: ledc
    pin: 23
    frequency: 25000Hz
    id: ledc_g
  - platform: ledc
    pin: 05
    frequency: 25000Hz
    id: ledc_b
    
light:
  - platform: rgbww
    name: "Kitchen Colour LEDs 2"
    id: kcl2
    warm_white: ledc_ww
    cold_white: ledc_cw
    red: ledc_r
    green: ledc_g
    blue: ledc_b
    cold_white_color_temperature: 5000K
    warm_white_color_temperature: 3000K
    color_interlock: true
    
    effects:
      - lambda:
          name: Slow Rainbow
          update_interval: 16s
          lambda: |-
            static int state = 0;
            auto call = id(kcl2).turn_on();
            call.set_transition_length(15000);
            if (state == 0) {
              call.set_rgb(1.0, 0.0, 0.0);
            } else if (state == 1) {
              call.set_rgb(1.0, 0.5, 0.0);
            } else if (state == 2) {
              call.set_rgb(1.0, 1.0, 0.0);
            } else if (state == 3) {
              call.set_rgb(0.5, 1.0, 0.0);
            } else if (state == 4) {
              call.set_rgb(0.0, 1.0, 0.0);
            } else if (state == 5) {
              call.set_rgb(0.0, 1.0, 0.5);
            } else if (state == 6) {
              call.set_rgb(0.0, 1.0, 1.0);
            } else if (state == 7) {
              call.set_rgb(0.0, 0.5, 1.0);
            } else if (state == 8) {
              call.set_rgb(0.0, 0.0, 1.0);
            } else if (state == 9) {
              call.set_rgb(0.5, 0.0, 1.0);
            } else if (state == 10) {
              call.set_rgb(1.0, 0.0, 1.0);
            } else if (state == 11) {
              call.set_rgb(1.0, 0.0, 0.5);
            }
            call.perform();
            state++;
            if (state == 12)
              state = 0;