Synchronising RGB-CCT and RGBW lights

I’m about to upgrade the LED strips in my kitchen. (Previously just had a pair of RGB strips).
One is RGBW, the other is RGB-CCT.

Both look identical when viewed via the Developer Tools → States page:

min_color_temp_kelvin: 2000
max_color_temp_kelvin: 6535
min_mireds: 153
max_mireds: 500
supported_color_modes:
  - color_temp
  - xy
off_with_transition: false
off_brightness: 102
friendly_name: Light name goes here.
supported_features: 40

However, the lovelace light card tells the truth, showing that only the RGB-CCT can have colour temperature control.

To set the RGBW to white, I simply set the RGBW colour to 0,0,0,255.
However, to set the RGB-CCT to white, I use the colour temperature. (I dont want RGB white, its the main reason I changed that strip).

When someone walks into the kitchen, the lights initially cycle through 2 or 3 different colours, just because it looks nice, but then settle on white as their on state. All of this worked perfectly when I had simple RGB strips, I just used a light group to sync them.

If I put these new LED strips with different capabilities into a light group, and how would I synchronise the final change to ‘white’, given that each strip will do it differently ?

I do not have same setup so only a guess.
I would think the CCT command would be ignored by the RGBW strip. Have you tried sending RGBW followed by CCT?

Good idea. I’ll try it and see what happens. The other option I just thought of is to use parallel in my automation to run 2 actions simultaneously.

Otherwise it’s only two lights … assuming you are using something like a script just call then separately.

I thought it through and I do have a similar situation. I have some lights that combine RBBW and RGBWW in a football scoring light flash. I will tell you that they do not sync when done this way. I would have hoped that all the lights (table is RGBW strip, triangle is RGBW strip, pergola is 8 RGBWW bulbs). Table and triangle are very close but pergola lags.

This script stores the current state as a scene, turns on the switches if they are off, flashes the lights with team colors 5 times, restores the scene as they were before.

test_football_lights:
  alias: Test Football Lights
  sequence:
  - service: scene.create
    data:
      snapshot_entities:
      - switch.switchlinc_relay_dual_band_1f_a8_f1
      - switch.switchlinc_relay_dual_band_1f_ad_f7
      - light.triangle_leds
      - light.pergola_leds
      - light.table_leds
      scene_id: nfl_game_score_lights_capture
  - service: homeassistant.turn_on
    data: {}
    target:
      entity_id:
      - switch.switchlinc_relay_dual_band_1f_a8_f1
      - switch.switchlinc_relay_dual_band_1f_ad_f7
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - repeat:
      count: '5'
      sequence:
      - parallel:
        - service: light.turn_on
          data_template:
            brightness_pct: 100
            transition: 0
            rgbw_color:
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[0][1:3]
              | int(base=16) }}'
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[0][3:5]
              | int(base=16) }}'
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[0][5:7]
              | int(base=16) }}'
            - 255
          target:
            entity_id:
            - light.triangle_leds
        - service: light.turn_on
          data_template:
            brightness_pct: 100
            transition: 0
            rgbw_color:
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[0][1:3]
              | int(base=16) }}'
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[0][3:5]
              | int(base=16) }}'
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[0][5:7]
              | int(base=16) }}'
            - 255
          target:
            entity_id:
            - light.table_leds
        - service: light.turn_on
          data_template:
            brightness_pct: 100
            transition: 0
            rgbww_color:
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[0][1:3]
              | int(base=16) }}'
            - '{{ state_attr(''ssensor.detroit_lions'',''team_colors'')[0][3:5]
              | int(base=16) }}'
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[0][5:7]
              | int(base=16) }}'
            - 150
            - 0
          target:
            entity_id:
            - light.pergola_leds
      - delay:
          hours: 0
          minutes: 0
          seconds: 5
          milliseconds: 0
      - parallel:
        - service: light.turn_on
          data_template:
            brightness_pct: 100
            transition: 0
            rgbw_color:
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[1][1:3]
              | int(base=16) }}'
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[1][3:5]
              | int(base=16) }}'
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[1][5:7]
              | int(base=16) }}'
            - 255
          target:
            entity_id:
            - light.triangle_leds
        - service: light.turn_on
          data_template:
            brightness_pct: 100
            transition: 0
            rgbw_color:
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[1][1:3]
              | int(base=16) }}'
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[1][3:5]
              | int(base=16) }}'
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[1][5:7]
              | int(base=16) }}'
            - 255
          target:
            entity_id:
            - light.table_leds
        - service: light.turn_on
          data_template:
            brightness_pct: 100
            transition: 0
            rgbww_color:
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[1][1:3]
              | int(base=16) }}'
            - '{{ state_attr(''sensor.detroit_lions'',''team_colors'')[1][3:5]
              | int(base=16) }}'
            - '{{ state_attr(''ssensor.detroit_lions'',''team_colors'')[1][5:7]
              | int(base=16) }}'
            - 150
            - 0
          target:
            entity_id:
            - light.pergola_leds
        - delay:
            hours: 0
            minutes: 0
            seconds: 5
            milliseconds: 0
  - service: scene.turn_on
    target:
      entity_id: scene.nfl_game_score_lights_capture
    data: {}
  mode: single

And you will note I am using parallel.

I’ve seen this lagging as well, I have a script that cycles through the random colours, and I’ve noticed if I target some RGBCCT bulbs I have, they can cycle much faster through the colours than my LED strips. I solved this by passing in a transition delay to slow down the script (but it also slows down the bulbs), but at least they stay in sync. The LEDs really aren’t happy unless I put in a 1.5 second delay.

So perhaps a mix of a transition delay AND a parallel for the final white action might work.

Side note … does your controller for the RGB lighting have “modes”? What are you using?
I would never implement the code that others have thrown out here as all of those state changes in LED lights through some color cycling automation will kill your history and state machine.

I use MiLight and an ESP8266 controller that has many built in “modes” (one of which is color cycling).
So I send one command to “activate” the mode and there are no state changes recorded except that one. It runs so much better (but of course you cannot synchronize).

No, I’m using a script I wrote myself, that was modified from a colour loop blueprint I found.
I then immediately realised that to loop through many colours would just mean spamming zigbee messages so I only use it sparingly to loop a few times before settling on white.

The new LEDs that will replace these current ones, one of them is WLED SK6812 so it’ll be WIFI based and supported a ton of built in effects using an ESP32 (Controller is a DigUno from Quinled)

1 Like

I then immediately realised that to loop through many colours would just mean spamming zigbee messages so I only use it sparingly to loop a few times before settling on white.

Exactly.