In-/decrease brightness by value
h00t2y opened this issue · 1 comments
h00t2y commented
FOA big thx for this project! Never used rust, took me half a day to make an on-off button in homebridge to control my l930 lights :) gonna be ok from now on...
If am right there is no option to in-/decrease brightness by value, like by steps, by for example +/-5%
Any idead how to achieve this or could i request a feature like this?
mihai-dinculescu commented
It can be achieved in a two-step process.
- Read the current brightness by calling
get_device_info
. - Call
set_brightness
and pass itcurrent_brightness -/+ 5
.
Some checks will be needed to ensure the new value doesn't go below 0 or above 100.