adds code

Watch: random RGB color shifts across multiple bulbs

The video above shows the finished effect in action: a set of RGB bulbs cycling through random colors, driven by a Node-RED flow with ESPHome and Home Assistant in the stack. It is the party-mode cousin of the base color-shift technique — same building blocks, randomized instead of sequenced.

Prefer the step-by-step version? The canonical guide RGB Color Shifts with ESPHome, Node-RED and Home Assistant walks through the base effect end to end; this walkthrough covers the randomized variant built on top of it.

Quick answer: The effect is a Node-RED flow that fires on an interval, picks a random hue, and pushes it to every bulb through Home Assistant. ESPHome firmware — or Tuya bulbs bridged into Home Assistant — makes each bulb individually addressable, and the importable flow JSON does the rest.

What does the random variant add?

A fixed color shift walks bulbs through a predictable sequence, which looks tidy but repeats. The random variant picks a new hue every tick instead, so no two runs look the same — exactly what a party, a game room, or a stream backdrop wants. Because the color choice happens in the flow rather than the bulb, changing the mood is a one-line edit, not a re-flash.

What do you need to build it?

  • Individually addressable RGB bulbs — ESPHome-flashed hardware gives the cleanest local control; Tuya bulbs work when bridged through Home Assistant.
  • Node-RED with the importable flow JSON from the author’s GitHub repository (linked in the sources) — it contains both this effect and a bonus weather-indicator flow that uses two bulbs to show the day’s forecast.
  • Home Assistant as the integration layer between Node-RED and the bulbs.

How does the flow work?

Conceptually it is three stages. An interval trigger (an inject node) fires every few seconds. A node picks a random hue — and optionally a random brightness floor so the room never goes fully dark. A service call then pushes the color to the bulbs through Home Assistant. Because the logic lives in the flow, tuning the tick rate, hue range, or brightness limits is a slider edit away; import the JSON, point it at one bulb first, then scale to the whole room once the timing feels right.

Where to go next

For the non-random base technique, the ESPHome side of bulb setup, and the Home Assistant wiring, the canonical guide linked above is the full reference — this walkthrough is the fun layer on top of it.

Sources

Previous Post Next Post