I’m new to HA and ESPHome and have some questions and looking for examples.
I have the ESPThings ET-AL01 Analog led strip controller. I don’t yet have a dashboard in HA and just using the overview page until I have a better understanding of things.
In the following example from ESPThings for their controller ET-AL01, what in the code presents itself to HA, ie what creates what I see to controller the leds on the HA overview page, so I can understand this a little better to add other controls?
What I’d like to do is add some extra features and effects, like what you would get with WLED, mainly features like fading from on colour to the next (is this called a rainbow effect). Are there any examples anywhere that I can follow to create my own?
What I’d really like to do, is select an area in the colour wheel then the leds will all fade from one colour to the next around that selected diameter/ring of the colour wheel.
Yea that was the reason I deleted my original post. Wasn’t sure on how analogue would react but you mention rainbow effect (I didn’t think rainbow would work). I only used addressable lights running WLED.
I dont think you can select a area in the colour wheel (so I think that’s out). Have you tried “random”
- strobe:
name: Green - Yellow # you could make a rainbow by adding in colors and name it "Rainbow"
colors: #just add in what you would like and as many you like
- state: true
brightness: 30%
red: 0%
green: 100%
blue: 0%
duration: 500ms
- state: false
duration: 10ms
- state: true
brightness: 30%
red: 50%
green: 50%
blue: 0%
duration: 500m
or this
effects:
- lambda:
name: My Custom Effect
update_interval: 1s
lambda: |-
static int state = 0;
auto call = id(my_light).turn_on();
// Transition of 1000ms = 1s
call.set_transition_length(1000);
if (state == 0) {
call.set_rgb(1.0, 1.0, 1.0);
} else if (state == 1) {
call.set_rgb(1.0, 0.0, 1.0);
} else if (state == 2) {
call.set_rgb(0.0, 0.0, 1.0);
} else {
call.set_rgb(1.0, 0.0, 0.0);
}
call.perform();
state += 1;
if (state == 4)
state = 0;
Not sure what will work it will just be trial and error… hope this helps you.
I’ll give them ago. I did try something I found on another post by adding 9effects-lambda), but the editor didn’t like the lambda, then again with my current limited knowledge, I may have got something wrong.
I’ll give your examples a try when I get chance and post my finding, as I’m sure there will be others that will benefit.
With your examples it’s given me a starting point to try, see what happens and learn from.
Does anyone know of an explanation/tutorial of lambda for a newbie as it looks more like c++ to me?
Ok, I’m now thinking I should use something along the line of the “on_boot”, But I haven’t quiet grasped it.
Hers what I have now, but get some errors;
If I hover over the little red X I see “target_platform”.
I’ve tried moving the added "on boot ", code around in different places and changed it a few times. I’ve also tried adding “platform: ESP32”, in different places.
Am I looking at doing this correct by using the “on boot”, to switch Off the cw leds?
When I switch the unit on or flash it, the cw leds are on full along with the random colour effect. I wish to switch the cw leds Off when booting and only come when I switch them On.
Hi Guys, @nickrout@Blacky
This works, but when an effect is running (in colour mode, slow rainbow) and I select Temperature, the white leds on stay on only for the Transition Length of what effect was previously running, then it changes back to the colour effect.
Do I need a statement such as; on_color_interlock: then: - effects.turn_off
Here is what I’m using at the moment after all the board info and passwords;