Hi all.
I would like to have a smooth - slow - light changing of several RGB stripes. I’ve read several ideas and solutions here, but I don’t get them working according to my needs. The “effect” transition time, isn’t available for all stripe types; other solutions are doing a strange dependency on now().second or the frequency of the call via automation.
What I want to do:
- Define an 3-dimensional array of RGB values for different lights config [0,0,255],[0,255,0];[255,0,0]… inside the script
- Define a variable where I can store the current array pointer within HA (variables or input_number ?)
Every time when call the script: - load the current array position value (pos) (from variable or input_number ?)
- set the light to the array values at pos (can use transition: y here if it is supported by strip)
- increase pos+1 and if pos > num_of_array_fields → reset pos to 0
- save pos back to (variable or input_number ?)…
Finally - call the script using an automation with time_pattern for instance minutes /5
What I don’t get, and where I need help with:
How to save a value to an external variable and how to get it back?
And - to be honest - how does the script exactly look like (but I’m willing to find this out myself;-))
And yes, I’ve understood that I can start learning python… I’m 50 years old, starting with BasicV7 and assamber on a C128, Turbo Pascal within CP/M, tried C, create a Java-script store and used PHP and visual Basic a lot. After so many years at the console, scripting company security and active directory, audits etc… I’m personally a bit tired to understand docker concepts and all the python include/import dependencies. I prefer to have an easy GUI - like Home Assistant. I’m using the build-in File editor but have huge problems to remember always on how to access the home-assistant core docker file system etc…
So I assumed that I can realize my idea above using a simple mix of automation and a call for a script. Just need to understand how to load a value from a variable (there is something like “variables:” as well in HA, or input_number) into a script and how to write it back to this variable when the script ends.
It would be great if you can point me to a link where I can read about, I’m fine too. But I haven’t found any example on what I want to do yet.
Thank you all in advance.