Step through colors with a single button

Using Zigbee2mqtt with a Gledopto RGWB controller and a Muller MLI-404011 (remote control)
I have setup on/off and brightness control using automations. But now i’m a bit stumped with the color wheel.

Now i know the color wheel is just a single button that cycles through colors when paired directly to the lights. And i see that action in the automation.
However in the Device action i can just select ( on/off, toggle, brightness+/-, flash)
I can use a service call with “light.turn_on” to select a RGB value, but i see no way of stepping through several colors.

When i search on the forum i just find color loops. But i just want each button press to do 1 step. not start a loop.

Any ideas in which direction i should look?

1 Like

Also looking for the exact samet thing. Found something?

1 Like

Yes, since the color wheel is just a single button i created an input_select in the configuration.yaml and made an automation that looks at every button at the remote as a trigger (and use trigger id).
Then whenever the color wheel gets pressed it will go through the premade list with input_select.select_next, just make sure you have the cycle set to true or it will stop at the end.

  - platform: device
    domain: mqtt
    device_id: 78031c81345338e1ceaffb45577761f4
    type: action
    subtype: color_wheel
    discovery_id: 0x00158d0002d51564 action_color_wheel
    id: colorwheel

condition: []
  - choose:
      - conditions:
          - condition: trigger
            id: colorwheel
          - service: light.turn_on
              entity_id: light.rgbw_esther
              color_name: '{{ states(''input_select.rgb_esther'') }}'
          - service: input_select.select_next
              entity_id: input_select.rgb_esther
              cycle: true

This is just the part with the color wheel.
In the configuration:

    name: RGB Colors Esther
      - red
      - green
      - blue
      - orange
      - yellow
      - purple
      - lime
      - gold

You can add whatever colors you like, or use a different way to call the colors like rgb_color


Hello, please help me write a program so that I can change only 3 colors, preferably “Kelvin” 3000 / 4000 / 6000 and off.
The button is released from esphome and the lamp is xiaomi.

I’m trying to do the same thing.

Newb question:

What part of the config file should I paste that into? I’m relatively comfortable with this kind of stuff, and have access to the config files through the Studio Code Server add-on, but haven’t messed with any of them directly and don’t want to mess anything up.

You can paste it almost anywhere in configuration.yaml
I just pasted it into the end of the file.

But now you can just create a helper from the GUI, its called Dropdown
From this link its explained where and how:

That totally worked using the Dropdown method through the GUI. Thanks!

I tried to replicate the same functionality, but applying to the light warmth instead of color (using an Aqara mini switch, single press for color cycle, double press for warm/cold white light cycle).

I tried copying this line…

color_name: '{{ states(''input_select.rgb_esther'') }}'

but customizing based on kelvin values that were assigned to another dropdown.

I couldn’t even get the lights to respond to a normal brightness or warmth directive, even when I ditched the input select and wrote the value straight into the automation and triggered it.

I ended up just using other “color names” that similarly matched the kelvin values that I was going for as a temporary solution.