Automatically adjust the color temperature and brightness of your lights throughout the day to match natural lighting patterns and improve your circadian rhythm.
Adaptive Lighting is a Home Assistant custom component that intelligently controls your smart lights based on the sun's position and time of day. It gradually transitions your lights from bright, cool white during the day to warm, dim lighting in the evening, helping maintain your natural sleep-wake cycle.
- Brightness: Automatically adjusts from 1% to 100% based on sun elevation
- Color Temperature: Transitions from warm 2200K to cool 6500K throughout the day
- Smooth Transitions: Gradual changes every 2 minutes with smooth 2-second transitions
- Configurable Sleep Window: Set your preferred bedtime and wake-up time
- Gradual Wind-Down: Lights start dimming 1 hour before your bedtime
- Gentle Wake-Up: Lights gradually brighten over 1 hour after your wake-up time
- Minimum Night Lighting: 1% brightness with warm 2200K during sleep hours
- Automatic Discovery: Finds all compatible lights in your home
- Turn-On Control: Immediately applies appropriate settings when lights are turned on
- Manual Override Protection: Respects manual adjustments and temporarily stops automation
- Selective Control: Exclude specific lights from adaptive control
- Time Selectors: User-friendly hour/minute pickers for sleep schedule
- Entity Selection: Visual interface to exclude specific lights
- Real-Time Updates: Changes apply immediately without restarting
- Dawn to Day (Low to High Sun): Brightness increases from 1% to 100%, color temperature cools from 2200K to 6500K
- Daytime (High Sun): Maximum brightness (100%) with cool daylight (6500K)
- Evening Transition (1 hour before bedtime): Gradual dimming from current brightness to 1%
- Night Mode (Bedtime to Wake-up): Minimum brightness (1%) with warm light (2200K)
- Morning Transition (1 hour after wake-up): Gradual brightening from 1% to 100%
- Turn-On Events: When you turn on a light, it immediately applies the current adaptive settings
- Manual Adjustments: If you manually change brightness or color, the system temporarily stops controlling that light
- Automatic Reset: Manual override is cleared when the light is turned off and on again
- Open HACS in Home Assistant
- Go to "Integrations"
- Click the "+" button and search for "Adaptive Lighting"
- Install the integration
- Restart Home Assistant
- Download the latest release
- Copy the
adaptive_lightingfolder to yourcustom_componentsdirectory - Restart Home Assistant
- Go to Configuration β Integrations
- Click "+" and search for "Adaptive Lighting"
- Go to Configuration β Integrations
- Click "+ Add Integration"
- Search for "Adaptive Lighting"
- Configure your settings:
- Night Start Time: When your sleep period begins (lights reach minimum)
- Night End Time: When your sleep period ends (lights start brightening)
- Exclude Entities: Lights you want to control manually
| Setting | Description | Default |
|---|---|---|
| Night Start Time | When night mode begins (minimum brightness) | 22:00 |
| Night End Time | When night mode ends (brightening starts) | 06:30 |
| Exclude Entities | Lights to exclude from adaptive control | None |
If Night Start = 22:00 and Night End = 06:30:
- 21:00-22:00: Gradual dimming from current brightness to 1%
- 22:00-06:30: Night mode (1% brightness, 2200K)
- 06:30-07:30: Gradual brightening from 1% to 100%
Adaptive Lighting works with any Home Assistant light entity that supports:
- Brightness control (required)
- Color temperature (preferred) OR RGB color (fallback)
- Philips Hue
- LIFX
- Zigbee lights (via ZHA/Zigbee2MQTT)
- Z-Wave lights
- WiFi smart bulbs (Tuya, TP-Link Kasa, etc.)
- Any other lights with brightness and color support
You can create multiple Adaptive Lighting instances for different areas:
- Create separate instances with different settings
- Use the "Exclude Entities" feature to assign lights to specific instances
- Perfect for having different sleep schedules in different rooms
Adaptive Lighting works alongside your existing automations:
- Manual brightness/color changes temporarily override adaptive control
- Turning lights off and on again re-enables adaptive control
- Use Home Assistant scenes and automations normally
- Ensure lights support brightness control
- Check that lights aren't in the exclude list
- Verify lights are turned on
- Restart Home Assistant to reload the component
- Manual override detection has a 1-second grace period
- Very rapid changes might not be detected as manual
- Turn the light off and on to reset manual override
- Restart Home Assistant after installing
- Clear browser cache if UI doesn't update
- Check Home Assistant logs for error messages
- Periodic Updates: Every 2 minutes
- Transition Duration: 2 seconds per change
- Turn-On Response: Immediate
- Sun Elevation: Uses Home Assistant's sun integration
- Brightness Formula: Linear interpolation based on sun angle (-6Β° to +30Β°)
- Color Temperature: Linear interpolation based on sun angle (-6Β° to +60Β°)
- RGB Fallback: CCT to RGB conversion for lights without color temperature support
Contributions are welcome! Please feel free to submit pull requests, report bugs, or suggest features.
This project is licensed under the MIT License - see the LICENSE file for details.
- Initial release
- Sun-based brightness and color temperature adjustment
- Configurable sleep schedule with transition periods
- Manual override detection
- Smart turn-on control
- User-friendly configuration interface
Enjoy better lighting that adapts to your natural rhythm! ππ