So I have been working on an addressable LED light strip to see if I can setup some permanent lights that during holidays I can just set them to the what ever holiday effect and have holiday lights. I have the light strip working and the below random color sections works. Every two seconds it changes the colors of each 5 pixel sections to something random. Ok great, but now my issue is I’m not understanding how I can have it slowly transition over say 10 seconds to one of 5 different colors.
So I’m hoping that someone can point me at some things to read/look over to understand how to make this happen. I’m new to coding in HA so I’m sure thats part of the issue.
Any assistance would be appreciated.
- addressable_lambda:
name: "Random Color Sections"
update_interval: 2s
lambda: |-
if (initial_run) {
it.all() = Color::BLACK;
}
for (int i = 0; i < it.size()/5; i++) {
it.range(i * 5, i * 5 + 5) = Color::random_color();
}
I tried the call.set_transition_length(1000); already and your get a message that call is not defined. Its one of the reasons I think I will have to use just lambda since it looks like its possible to get call defined there.