Extending support of set_status()
jkerdreux-imt opened this issue · comments
Right now, set_status only support one value, of type bool. In many cases, more than one value is needed. And of course this is not a bool type.
In example, for a bulb you can set the brightness and the color temperature. dps 3 and 4.
This can be done w/ something like this.
tuya.set_status(device,{1:True,2:'white',3:100,4:100})
And rename the old set_status to set_state ?
set_state(device: dict, value: bool,idx: int = 1):
Okay good change, but it breaks previous implementations. I pulled it into the development branch. Will bump version and merge to master later this evening. Thanks for the contribution!
merged and released https://pypi.org/project/tuyaface/1.1.0/