Dynamic light gradient controller - automatically generates light gradients between multiple bulbs

I created this blueprint to solve a specific problem I had with my 6-bulb IKEA VIDJA floor lamp. I wanted to display smooth gradients from top to bottom, but manually setting the colour or temperature for the middle bulbs was a losing battle.

This blueprint acts as a controller that watches your defined "Top" and "Bottom" bulbs. When they change, it automatically calculates the intermediate values and applies them to the middle bulbs to create a seamless gradient. This was created with the assistance of AI.

Key Features:

  • Brightness and colour gradients: Creates a gradient for colours and brightness.
  • Dynamic Light Quantity: Supports anywhere from 3 to 10 individual bulbs.
  • RGB and Colour Temperature Aware: Automatically detects if you are using colours (RGB/HS) or whites (colour temperature/mireds) and sets the correct mode for the intermediate bulbs.
  • Configurable Variables:
    • Initial Warm-up Delay: Time to wait before reading trigger states, useful for simultaneous scene triggers, voice assistants etc.
    • Bulb Transition Time: Fade time for the bulbs.
    • Cascade Delay: Stagger time between each middle bulb updating.
    • Anti-Storm Cooldown: Prevents the automation from re-triggering too quickly.
  • Scenarios covered:
    • Top on, bottom off - Brightness gradient from top using only 1 colour/temp.
    • Top off, bottom on - Brightness gradient from bottom using only 1 colour/temp.
    • Both colour - Gradient using RGB and brightness.
    • Both temp - Gradient will use mireds and brightness.
    • One colour, One temp - Gradient will use RGB and brightness.
    • Both off - All lights off.

Code & Installation:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

You can review the code or import the blueprint from my GitHub repository here:

Feedback and improvements are welcome. This is my first blueprint so go easy on me :slight_smile:

Example 1 - Colour to colour

Example 2 - Temp to Temp

Example 3 - Temp to colour

Example 4 - Colour to off