Hello everyone! I hope you’re all having a great day. I wanted to share a fun project I’ve been working on with my Hue lamps. I’m trying to set up an automation that changes the color of my Hue lamp to a random color every minute, but only after sunset. It’s a cool way to add some ambiance to my evenings without too much effort. However, I’m still pretty new to automations, so I’m reaching out for some guidance.
First, I know that I need to use the Hue integration in Home Assistant to control the lamp. I’ve heard that automations can be created using the automation editor, but I’m not entirely sure how to structure the payload for a random color change. I also need to make sure that the automation only activates after sunset. I think I need to use a time condition or maybe integrate with the built-in sunset sensor.
Here’s what I’ve thought of so far:
- Trigger: The automation should start after sunset. I believe there’s a built-in sensor for sunset times that I can use as the trigger.
- Condition: Maybe check if the current time is after sunset.
- Action: Change the Hue lamp color to a random color every minute. I’m not sure how to generate a random color value within the acceptable range for Hue lamps.
- Constraints: Ensure the automation runs continuously after sunset until sunrise.
I would really appreciate it if someone could provide a sample automation configuration or point me in the right direction. I’m excited to get this working and hopefully, it can inspire others to try similar projects!
Also, if anyone has tips on how to make the color transitions smoother or more dynamic, I’m all ears. Thanks in advance for your help!