Setting light colors? #719
Locked
Jonathanese
started this conversation in
General
Replies: 1 comment
-
Please join the discord server. We have support there. Check netdaemon.xyz for invite url. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm relatively new to NetDaemon, but I'm glad I found it because it is a much better format for creating complex automations.
I'm currently trying to build a wrapper or interface or whatever the term is. Basically, I'm trying to create libraries to simplify the functionality to where you are doing more hard-typed native c# coding and less of the raw API calls.
I'm currently working on the lighting wrapper and am learning the basics so I can get an idea of how I'll organize things. I'm past "blink a light" and on to "change a color" and I'm having issues. TurnOn() can take a object rgbColor. But I'm not sure what it's supposed to look like. I've tried a few variations in the code below. Different colors so it is clear which one succeeded.
Only TurnOn(0) turns the light on.
Ultimately here's what my function would look like.
This way, instead of tossing around and converting strings, I can use a System.Drawing.Color object. Or perhaps a custom color object.
Not sure where development is on this, but I haven't seen any examples that use many of the parameters and certainly none that use the multi-value parameters, so I wasn't sure if this was implemented yet. If not, I might find another workaround to get colors to set.
Beta Was this translation helpful? Give feedback.
All reactions