Automate lighting to follow circadian rhythms

I set up circadian lighting in Home Assistant to match the light in the house to the day. I wanted cooler, brighter light in the morning and through the day, then warm, dim light in the evening. That does make evenings easier to live with. It also stops the house feeling like an operating theatre after dark.

Use tunable white lights. They let you change colour temperature in kelvin. Philips Hue, IKEA TRÅDFRI tunable bulbs, or any Zigbee tunable white lamp through a Zigbee gateway like ConBee II, ZHA, or Zigbee2MQTT will do the job. Wi-Fi tunable bulbs can work too, but they often lag or drop off more. Pick devices that report brightness and colour temperature to Home Assistant, since that keeps the automation simpler. For daytime, I used colour temperatures around 5,000–6,500 K and brightness near 100%. For evening, 2,000–2,700 K and 20–40% brightness made more sense. I also kept a physical override switch or a simple scene so I could turn the automation off when it was getting things wrong.

Connect the lights to Home Assistant first. With Hue Bridge, add the integration and import the lights. For Zigbee, use ZHA or Zigbee2MQTT and join the devices. For Wi-Fi kit, check for a native integration or flash Tasmota where that is practical. Once the lights show up, test basic service calls: turn them on, change brightness, change colour temperature. If a light does not accept colour temperature, the automation can only change brightness. I grouped lights into room entities such as light.lounge and light.kitchen. I also used input_booleans for “Auto lighting enabled” per room so I had quick local control.

The automation pattern I use is simple. Use the sun integration for sunrise and sunset triggers with offsets, and use time triggers for mid-day shifts. Add a presence or occupancy check if you want lights to stay off when nobody is home. Use a transition so the change is smooth rather than abrupt. This YAML is a workable starting point; change the entity IDs and the kelvin and brightness values to suit your lights.

alias: Circadian lighting — morning
trigger:
  - platform: sun
    event: sunrise
    offset: "-00:30:00"
condition:
  - condition: state
    entity_id: input_boolean.auto_lounge_lighting
    state: "on"
action:
  - service: light.turn_on
    target:
      entity_id: light.lounge_group
    data:
      brightness_pct: 100
      kelvin: 6000
      transition: 600

For evening, use a sunset trigger with a positive offset. Lower the kelvin and set brightness_pct to 20–40. If you want the light to shift through the day, add extra automations at mid-morning and late afternoon, or use Adaptive Lighting or the circadian_lighting custom component. Those handle continuous changes and manual overrides better. Test each scene at the time it will actually run and adjust kelvin and brightness until the light feels right.

The details matter. Short transitions look abrupt. Long transitions avoid obvious jumps, but they can be too slow if you move between rooms. If someone is watching a film, the automation should leave the cinema scene alone. I used input_booleans and simple templates to skip automation when input_boolean.movie_mode is on. Check failures in the Home Assistant log; if a light does not change, the last service call is there. Flaky devices usually need moving closer to the coordinator or moving to a different protocol.

Start with one room and run it for a week. Dial in the values, then leave the override obvious so anyone in the house can switch it off. That was enough to get a working circadian lighting setup in Home Assistant without making the room feel like it was being managed by committee.

Related posts

Immich | v3.3.6

Immich v3 3 6: onnxruntime telemetry disabled in ML container, anonymous metrics stopped, upgrade to v3 3 6 to restore privacy, thanks to the community

Ransomware group fragmentation and detection priorities

Ransomware group fragmentation means the label matters less than the behaviour, and I trust activity over reputation every time. A small crew with rented services can do plenty of damage, so I watch...

k3s | v1.37.2+k3s1

k3s update: upgrades embedded Kubernetes to 1372, bumps core components, backports stability fixes, and improves CI, testing and reproducible builds