With the code of the master branch, as of today,(not sure about last Pypi, didn't check)
we can't turn on a lightbulb by setting it's brightness level, if the brightness level is the same as before, EVEN when the light bulb is currently OFF.
This is a regression from the latest refactoring, this used to work in the past.
Steps to reproduce:
# setting up
from pyvesync import VeSync
mg = VeSync("###redacted_email###", "###redacted_secret###", "###region###", debug=False)
mg.login()
mg.update()
mb0 = mg.bulbs[0]
mb0
mg.debug = True
#actual steps to reproduce issue
mb0.set_brightness(100)
mb0.turn_off()
mb0.set_brightness(100)
# here, the bulb will stay OFF when it shouldn't, no API call is made
I found the offending lines of code. And there is similar broken logic for color_temperature and rgb changes as well for differnet bulbs.
I'll do a PR to fix those this Sunday if I am able to find some time.
With the code of the master branch, as of today,(not sure about last Pypi, didn't check) we can't turn on a lightbulb by setting it's brightness level, if the brightness level is the same as before, EVEN when the light bulb is currently OFF.
This is a regression from the latest refactoring, this used to work in the past.
Steps to reproduce: