Smart Lighting Automation for Nighttime Comfort

I’ve been experimenting with creating a more comfortable lighting setup for nighttime use, and I wanted to share my experiences and ask for any tips or suggestions from the community.

The Setup
I have five colored lights in my living area that are triggered by motion sensors at night. Right now, they simply turn on using the last saved state for color and brightness. While this works, I’d love to make it more dynamic based on the time of night.

The Goal
My idea is to create a virtual sensor that adjusts the brightness and color of the lights depending on the time. For example:

  • 6 PM to 10 PM: Brighter lights with warmer tones to create a welcoming atmosphere as the day ends.
  • 10 PM to 5 AM: Softer, cooler lights to help maintain a calm environment conducive to sleep.

The Plan
I think this could be achieved by setting up a virtual sensor with JSON values that change throughout the night. Then, I’d use this sensor to control the lights when they’re triggered by motion. This way, the lights would automatically adjust their settings based on the time of day without needing manual intervention.

Questions and Requests

  • Has anyone already implemented something similar? I’d love to learn from your setups!
  • Are there any integrations or automations that could simplify this process?
  • What’s the best way to create and manage a virtual sensor with dynamic values?

I’m really excited about the potential of this project and would appreciate any advice or pointers the community can offer. Let’s make nighttime lighting more comfortable and automated! :crescent_moon: