Need Help with Custom ESPHome Sunrise Effect - LEDs Not Lighting Up

I see multiple problems :frowning:

You start with an “initial run” setting all the LEDS’s to BLACK, so the first time you do a ".remote_value() the RGB value wil be 0,0,0. Then you multiply this value with the brightness, but that won’t change the RGB value,

That’s also the second problem. You are mixing RGB values with brightness. RGB values ranges from 0,0,0 (Black) till 255,255,255 (White). And all the other colors are a combination of these values (see RGB Color Codes Chart 🎨)

The brightness is another attribute. Multiplying a RGB value with the brightness will not change the brightness but the color…

Thank you so much for your observations and suggestions. I am currently testing the latest updated model of ChatGPT 4o, which was updated yesterday, to see if I can create the effect I’ve had in mind for a long time. Unfortunately, it hasn’t worked out as expected.

After incorporating your feedback, I’m still facing issues with getting the LEDs to light up as intended with this custom effect. I would be incredibly grateful if you could provide a functional example of code that achieves the “Sunrise” effect I’m aiming for.

Thank you very much in advance for your help!

It is quite rude to have an AI generate code, and have the community waste time debugging it. Also without saying where it came from in the first post. AI cannot understand code, it just spits something out that sounds plausible, but might be utter nonsense (which it is).

2 Likes

If I had known this was ChatGPT code, I wouldn’t have even responded.

I completely agree with Edwin_D’s response. And I wish you the best of luck in further improving that nonsense code. You learn the most from solving the bugs yourself…

2 Likes