Hue switch between "color mode" and "white mode'

First of all, I’m a newbie in Home assistant.
So, I’m playing with my lights.
for now, I’m playing with a color light (hue) and a white-only light.
So, I created multiple script like this (to keep it simple)

alias: Lights_Concentreren
sequence:
  - service: light.turn_on
    data:
      brightness: '{{brightness}}'
      color_temp: '{{color_temp}}'
      entity_id: '{{entity_id}}'
      transition: '{{transition}}'
mode: single
icon: 'mdi:lightbulb'
variables:
  brightness: 255
  color_temp: 233
  entity_id: light.woonkamer_spots
  transition: 0

like the “concentrate scene” in the hue app. I made a few others, (reading, dimmed,…)
everything ok
but,
then I added script that would mimick “nightbulb”

alias: Lights_Nachtlampje
sequence:
  - service: light.turn_on
    data:
      brightness: '{{brightness}}'
      rgb_color:
        - '{{rgb_color_red}}'
        - '{{rgb_color_green}}'
        - '{{rgb_color_blue}}'
      entity_id: '{{entity_id}}'
      transition: '{{transition}}'
mode: single
icon: 'mdi:lightbulb'
variables:
  brightness: 1
  rgb_color_red: 255
  rgb_color_green: 160
  rgb_color_blue: 39
  entity_id: light.woonkamer_spots
  transition: 0

as you can see, it’s kind of dimmed red color.

the white only lamp, just dims the lamp, which is no problem (it has no color of course)
but the color lamp, doesn’t do a thing. It doesn’t turn dimmed red
When I turn off the color lamp, and call the script “nachtlampje”; it works.

In the hue app, there’s a kind of “White mode” and “color mode”.
Is there a way to change to “mode” ? Or, do I have to add at light.turn_off before I turn the light on?
Anyone who has a solution?
thx

Hi Stefan_U,
Did you ever figure this out…I have be struggling trying to change the colors on my Hue bulbs.
Thanks

Still no answer :slightly_frowning_face:

Have you tried color_name: white ? This should work also when the light is already on and in color mode.

Otherwise, effect: white_mode works only if the light was previously off.

thx! will try that!

service: light.turn_on
data:
  kelvin: 6500
  effect: white_mode
target:
  entity_id: light.xxxx

Is working for me (without turning it off first)

i just found out if you remove the brightness line it works. :

sequence:
  - service: light.turn_on
    data:
      effect: red_mode
      rgb_color:
        - '{{rgb_color_red}}'
        - '{{rgb_color_green}}'
        - '{{rgb_color_blue}}'
      entity_id: '{{entity_id}}'
      transition: '{{transition}}'
mode: restart
alias: RedBulb
icon: mdi:alarm-light
variables:
  rgb_color_red: 255
  rgb_color_green: 1
  rgb_color_blue: 3
  entity_id: light.smartlight_a19_rgb
  transition: 0
1 Like

Thanks for your reply