-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat:Added command sending mode for lights to optimize the lighting effect #1150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat:Added command sending mode for lights to optimize the lighting effect #1150
Conversation
|
The absence of this feature does not affect the normal use of the light. Adding this feature introduces too much complexity. |
|
I think it greatly affects the lighting effect and the entire smart home experience. An abrupt flash or color change completely affects the meaning of smart home. This time the code has limited increase in complexity. In fact, it just adds a batch sending function, and the default logic is still the previous one. And I believe that the batch sending function will be added in the future due to other problems. And I can always maintain this function. Please consider merging it. |
|
我在想要不要把def set_property_async 直接封装成 这样就不会有冗余了 set_properties_async的后续逻辑都是按照set_property_async的后续去写的 所有判断和检查也都做了 完全可以合并没有风险 |
|
@SusanPhevos |
e5a5bb5 to
b95a2c1
Compare
a43c93a to
fc1129b
Compare
feat: Added control command sending method for lamps
Added three ways to turn on the lamp. A Select was added under the configuration page of each lamp
1.Send One by One. The original method is to turn on the lamp, color temperature, brightness, and mode one by one (default value)
2.Send Turn On First. The command to turn on the lamp will be executed first each time, and then the color temperature, brightness, and mode will be sent in batches
3.Send together. All commands are sent together
Users can choose the most suitable method to send the command to turn on the lamp according to the firmware function of their lamps
Most lamps support Send together, which will make the turning on of the lamp the fastest and the display effect of the lamp on the lamp the best. For details, please refer to the problem mentioned in #983
A small number of lamps only support Send Turn On First. The command to turn on the lamp must be executed first before the subsequent color temperature and brightness adjustment can be accepted
Some old lamps can only be sent one by one by default
This update does not affect the previous configuration and will not affect previous users. The default logic has not changed
All test scripts have passed and all functions have been tested on my own physical machine
Since I have been using pycharm, I am not very good at using vscode. I didn't modify much code, but after formatting, a lot of the original code changed format, resulting in a lot of modifications. I did configure the googlestyle formatting tool, but the result was not satisfactory. Can you help me see where the problem is? However, the code quality is definitely no problem
#983