FireMarshmellow/Spotlight_Storage

WLED light settings after 5 second sleep

Closed this issue · 2 comments

Just trying to get some clarification (or customization) on what is happening with the lights after the locate function. It looks like this portion here (arrowed) is sending that code but after looking at the WLED api documentation I am not sure what I would change this to

def lights(position, pi):
start_num = int(position) - 1
send_request(pi, start_num, int(position), [255, 255, 255]) # Convert color value to [0, 0, 0, 255] to only use white part of LED (RGBW LEDs only).
time.sleep(5) # Change how long the LED stays on for.
---> send_request(pi, 0, 60, [0, 255, 0]) <----

Is it possible to send a command back that would let it go back to the existing effect setting? For my instance I had scanner selected with pink/blue colors but now I am getting green and blue. Something to note is that I do have to change the RGB sequence in WLED for these strips to function correctly. (The color order is GRB in my settings)

Yeah it's kind of annoying in that way, I tried getting it to go back to previous settings after the locate function. But the only reliable way I've seen other people do it, is by running yet through node-red on home assistant. And that adds a whole layer of complexity. You can modify the request to include effects, but I don't do that in the code because I would be making an assumption that everyone likes the same effects I do.

Thanks for confirming and yep that makes sense. I just modified the script to a color code of my choice and it's working as desired :)