LIFX: small error corrections#7446
Merged
Merged
Conversation
This clears the internal cache in case polling picked up the state as set by an effect. For example, aborting an effect by selecting a new brightness could keep a color set by the effect.
State restoration takes up to a second because bulbs can be slow to react. During this time an effect could keep running, overwriting the state that we were trying to restore. Now the effect forgets the light immediately and it thus avoids further changes while the restored state settles.
This does not really matter because the colorloop uses saturated colors (without much white). Anyway, just copy the 3500K that the LIFX app uses.
It's a reasonable default for several light effects.
This update silences some warnings (aiolifx/aiolifx#7).
Forcing a refresh will log a warning if the periodic async_update happens to be running already. So let's do the refresh locally and remove the force_refresh.
Recent aiolifx allow sending messages to unregistered devices (as a no-op). This is handy because bulbs can disappear anytime we yield and constantly testing for availability is both error-prone and annoying. So keep the aiolifx device around until a new one registers on the same mac_addr.
robbiet480
approved these changes
May 5, 2017
Member
|
Cherry-picked for 0.44. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Several minor fixes and cleanups. Details in each commit message.
Checklist:
If the code communicates with devices, web services, or third-party tools:
toxrun successfully. Your PR cannot be merged unless tests passrequirements_all.txtby runningscript/gen_requirements_all.py.