i wanted to control color of single rgb LED (2812) for which im currently using following code, id(LED0).turn_on().set_rgb(id(off_red), id(off_green), id(off_blue)).set_brightness(id(off_brightness)).set_transition_length(10).perform();
The rgb values are assigned in global variables in the code, hence when above line of code executes the value of RGB will get extracted from globals and the color is set to particular LED accordingly.
now i have to change the color from front end of Home Assistant. so that i can assign any custom color based on my mood.
which mean i need to get the RGB values from color pallet and store it in variables. so that the color changes automatically on particular action.
Please suggest me with any available example.
Thanks in advance.
Appreciate if you could give us an example code that would get the rgb values from color picker UI and assign the float value to the global so that when i execute the script the color auto updates.