Live healthier and sleep better by syncing your lights with natural daylight

Disclosure: This post contains affiliate links. If you click through and make a purchase, I will earn a commission, at no additional cost to you. Read my full disclosure here.

Circadian Lighting, one of the most popular add-ons on the Home Assistant Community Store, is becoming a first-class citizen in Home Assistant. While there is the Flux platform which changes the temperature of lights already available, it is far inferior to Circadian Lighting.

A fork of Circadian Lighting, going by the name of Adaptive Lighting, will be added to Home Assistant in a future update. Let’s take a look at these platforms and discuss why you should be using them.

Why adjust the colour/temperature of lights

Having your lights synchronized with the naturally occurring colour temperature of the sky throughout the day has numerous potential benefits. Besides giving your home a more natural feel with cooler hues during the daytime and warmer hues near twilight and dawn, there are a number of reported health benefits.

What is the circadian rhythm?

A circadian rhythm is a natural, internal process that regulates the sleep-wake cycle and repeats on each rotation of the Earth roughly every 24 hours. This rhythm responds primarily to light and darkness in an organism's environment. The amount of light which enters your optic nerve influences the hormones your body produces. When there is less light, your body produces melatonin, and you become drowsy.

Artificial light can mess up your natural circadian rhythm. The light coming from lamps, phones, and TVs tell your body that it isn’t nighttime yet. To counter that, the Home Assistant components Flux, Circadian Light, and Adaptive Light adjust your lights to match the hue of the outside light.

What is Flux?

Flux is a switch platform which controls your light similar to how the popular application f.lux controls your PC monitor, using circadian rhythm. With Flux active, your lights will be bright and cooler during the daytime and gradually fade to a warm red/orange at night.

While seemingly perfect, Flux has some drawbacks which have left many a user frustrated. Just about all the issues experienced with Flux are fixed in Circadian Lighting, making it the better option in every way.

What is Circadian Lighting?

Circadian Lighting is a Home Assistant component developed by Bas Nijholt. It is available on HACS, which is my preferred way of installing it. If you’re looking for reasons to use Circadian Lighting, here’s just a few:

  • Circadian Lighting has two main components: a sensor and switch (or multiple switches). The sensor maintains the calculated colour temperature to keep all lights in sync. The switch allows for specific options to be set for specific groups of lights.
  • In contrast to Flux it tracks the state of all configured lights. In doing so, it can instantly react to a light being turned on. And when a light is turned on, the transition to the colour temperature defined by the sensor is almost instant.
  • Because Circadian Lighting creates a sensor which makes the calculated colour temperate available to all other components, you can create automations in which lights turn on with exactly the right colour temperature. That way, there won’t be a jump from the previous colour.
  • Circadian Lighting can automatically disable when a specified entity is in a specified state. This allows you to disable Circadian Lighting without having to manually toggle it off or create an automation to do so.
  • You can use Circadian Lighting to create a nightlight (or as I call a pee light) using the sleep mode. This mode activates when a specific entity is in a specified state. So if you use a binary_sensor to let Home Assistant know when you are asleep, you can use the same sensor to turn on sleep mode.

One sensor for all lights

Another benefit of using Circadian Lighting is that all of your lights can be controlled using a single sensor. It doesn’t matter whether the lights are RGB, RGBW, or whathaveyou. Lights which only adjust the temperature are supported, and lights which only dim.

What are the downsides of using Circadian Lighting?

Because Circadian Lighting has so many variables which can be configured (but don’t have to be) it can appear a bit intimidating to newcomers. The Circadian Lighting can only be configured using YAML, there is no UI configuration available. That issue will be addressed with the introduction of Adaptive Lighting.

What is Adaptive Lighting?

Adaptive Lighting will be an official component for Home Assistant forked from Circadian Lighting. In contrast to Circadian Lighting, Adaptive Lighting should be easier to configure through the web interface. Despite being easier to configure, Adaptive Lighting doesn’t remove any functionality from Circadian Lighting. You can even configure it using YAML, which should give you some more advanced options.

How to install Adaptive Lighting now

If you want to give Adaptive Lighting a try now, before it is integrating into a Home Assistant release, you can install it by adding the following repo to HACS:

To do so, enter HACS from the Home Assistant menu and add a custom repository from the three-dot button in the top right-hand corner. Select integration in the window which opens up and paste the URL. You should now see the option to install Adaptive Lighting. Once installed, you will need to restart Home Assistant, and then you will be ready to configure it.

Configuring Adaptive Lighting

The Adaptive Lighting configuration is added from the UI. Simply enter the configuration, click on Integrations and search for Adaptive Lighting. Next, you will have to enter a name. You can create multiple instances of Adaptive Lighting. Say you wanted to only have the hue and not the brightness of your office lights adjusted but in the bathroom, you wanted both the hue and brightness to be adjusted you could do that using multiple instances. Each instance can contain multiple lights.

In this example, I’m configuring my office lights. The office is equipped with a couple of Philips Hue temperature adjusting lights. And all I want to happen in this room is for the lights to adjust their temperature, but not their brightness. Using the UI, I can easily disable the brightness adjustment.

I’ll also configure a nightlight, which will be enabled when a certain input_select is set to sleeping. And just like that, I’ve configured my lights.

More can be done

Once you’ve got Adaptive Lighting configured, you’ll notice that there are a bunch of other options available. I’m sure the descriptions of these will be cleaned up a bit before it is officially a part of Home Assistant. A good overview of these options can be found in the Circadian Lighting wiki.

3 thoughts on “Live healthier and sleep better by syncing your lights with natural daylight”

  1. You might want to specify where the option panel is when you say “Using the UI I can easily disable the brightness adjustment.”. It took me a few minutes of rooting around before I realized it was right where I was when I did the install.

    • The instructions on how to configure this item are clearly listed in the repository. Also there are tutorials around.
      I didn’t take this article as a tutorial. It just highlights the benefits of Circadian Lighting applications in Home Assistant 🙂

  2. You have a mistake on who developed Circadian Lighting.

    Bas Nijholt forked Circadian Lighting and created Adaptive Lighting from it, which is actively updated.
    Circadian Lighting, the original one, is not actively maintained it seems right now and the Github user is clatonjn.
    Let’s credit the right person.


Leave a comment

Share to...