mihai-dinculescu/tapo

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?

It can be achieved in a two-step process.

  1. Read the current brightness by calling get_device_info.
  2. Call set_brightness and pass it current_brightness -/+ 5.

Some checks will be needed to ensure the new value doesn't go below 0 or above 100.