Dynamic Lighting Blueprint (Lux + Circadian + Real-World Tuning)

Dynamic Lighting Blueprint (Lux + Circadian + Real-World Tuning)

Overview

This blueprint provides a dynamic lighting system that adjusts brightness and color temperature based on real-world conditions rather than fixed schedules. I have a major sleep disorder and created this, as good lighting makes this more livable. It has been running in my house for over 18 months, and thought it was time to share after I made some changes after the last HA release switching from mireds to color_temp_kelvin.

Instead of relying on time-of-day alone, this system uses ambient light (lux) to determine how bright your lights should be, while still incorporating a circadian rhythm for color temperature throughout the day.

It also accounts for a critical real-world factor often overlooked in lighting automation: perceived brightness.

A room can technically measure as “bright enough” in lux, but still feel dim due to cloud cover, storms, or indirect sunlight. This blueprint allows you to tune for that difference based on the reported weather forecast.

The result is lighting that feels consistent, natural, and responsive to both measured and perceived conditions.

It does take some tuning. I do not know where your lux sensor is, and I do not know what “Bright Enough” looks like to you. You also will need to know at what lux level, “We should really turn on the lights in here.” You will have to keep an eye on your lux sensor to understand your baselines are. I do recommend you placing it near a window, but does not need to be in direct sunlight. Just the brightest area of your house for best results. I only have one lux sensor, but have several copies of the automation running for each room. One for my living room, and one for my office.

Git Readme has details on each input.

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

Key Features

  • Brightness adjusts dynamically based on room light levels (lux)
  • Smooth transitions to avoid abrupt lighting changes
  • Automatic shift from cool daylight tones to warm evening tones
  • Prevents unnecessary lighting when sufficient natural light is present
  • Adjustable thresholds to compensate for cloudy or low-contrast lighting conditions
  • Fully customizable to match room preferences and sensor placement
  • Ability to set up an override light to stop the automation.

Requirements

1 - Lux Sensor (Required)- A sensor that reports ambient light levels (illuminance in lux).

Examples:

  • Philips Hue Motion Sensor
  • Aqara Motion Sensor (with lux)
  • Any Zigbee or Z-Wave illuminance sensor

This blueprint depends on real-time lux readings. Without it, the automation will not function as intended.

2 - Tunable White Lights (Required for full functionality) - Lights must support brightness and color temperature control.

Examples:

  • Philips Hue White Ambiance
  • LIFX bulbs
  • IKEA Tradfri (tunable models)
  • Other Zigbee tunable white lights

Lights that only support on/off or dimming will not benefit from color temperature adjustments.

How It Works

The system maps ambient light levels (lux) to brightness output.

  • When the room is dark (low lux), lights increase in brightness. When the room is bright (high lux), lights dim or remain off
  • Color temperature shifts throughout the day to match natural lighting patterns
  • Accounting for “Perceived Darkness”

Lux readings alone do not always reflect how a space feels.

For example:

  • A sunny room with direct light may feel bright at 2500 lux
  • A cloudy or stormy day may also read 2500 lux, but feel noticeably dim

This blueprint allows you to compensate for that by adjusting your thresholds so that:

  • Lights can activate earlier on overcast days
  • Rooms maintain a consistent “feel,” not just a consistent measurement

This is achieved through tuning max_lux, min_lux, and brightness ranges to match your environment and preferences.

Final Notes

This system is designed to disappear into the background. When configured correctly, it should not draw attention to itself. Instead, it should make your environment feel consistently comfortable throughout the day.

The addition of perceived brightness tuning is what elevates this beyond a standard lux-based system. It allows your lighting to adapt not just to measurements, but to how a space actually feels to the people in it.

Adjust slowly, observe behavior, and tune based on lived experience. Once it is all dialed in, it will just work.

Lastly, I used AI to help me with this. It took 34 versions to get it right, if anyone want to approve it, please feel free.

2 Likes