Open zoltak opened 3 months ago
Got you - that should be doable @zoltak, I'll add it to the list of things for the next version!
@taburineagle I have generated code that provides this functionality. I haven't tested with the GUI and may need more testing around the validation. You can find the update here
Ah, excellent, thank you @zoltak! I'll have to check that out over the weekend and make the changes on my end as well.
OK, I've taken a quick look at the code changes @zoltak, and everything looks good, still need to do a few things first before making a PR, but looks good - I also saw you improved the logistics for that one section in processHTMLCommands
, that makes more sense to get the list of lights first... One thing I'm a little bit confused by though, is why did you convert the brightness value to a float? Neewer lights only use integer math (there's no 55.5% brightness, only 55% and 56%), so I'm assuming it needs to be a float to work more nicely with max/min
?
Ah, I think I see why - if you try to coerce a string with a decimal into an int, it throws an error... interesting.
@taburineagle I think it should be ok cast as a int. I did a quick test and it didn't throw any errors.
Would it be possible to add support to increase/decrease brightness by increments from current setting e.g.
Increase brightness by 10 increment from current value:
http://127.0.0.1:8080/NeewerLite-Python/doAction?light=11:22:33:44:55:66&bri=+10
Decrease brightness by 5 increment from current value:
http://127.0.0.1:8080/NeewerLite-Python/doAction?light=11:22:33:44:55:66&bri=-5
The requirement is for using Stream Deck and having a button to tap to increase or decrease the brightness by increments while streaming without having to keep state on the client side.