Skip to content

Improvements to LIFX reliability#14848

Merged
balloob merged 3 commits intohome-assistant:devfrom
amelchio:lifx-connect-improvements
Jun 7, 2018
Merged

Improvements to LIFX reliability#14848
balloob merged 3 commits intohome-assistant:devfrom
amelchio:lifx-connect-improvements

Conversation

@amelchio
Copy link
Copy Markdown
Contributor

@amelchio amelchio commented Jun 6, 2018

Description:

This PR fixes some rare issues with LIFX reliability:

  • Unavailable lights would sometimes never return to available (fixed in aiolifx 0.6.3).
  • A failed initialization would not unregister the light device, causing re-initialization to be delayed.
  • The device.get_version call will not use the callback after its first successful call. Work around that by calling it last so it is not retried if device.get_color fails.

I also removed some excessive logging and rewrote a few lambda expressions to list comprehension.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox.

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

@ghost ghost assigned amelchio Jun 6, 2018
@ghost ghost added the in progress label Jun 6, 2018
@amelchio amelchio removed their assignment Jun 7, 2018
@balloob balloob merged commit 6b2b92a into home-assistant:dev Jun 7, 2018
@balloob balloob mentioned this pull request Jun 22, 2018
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
* Improve fault tolerance of LIFX initialization

* Update aiolifx to 0.6.3

* Use list comprehension
@home-assistant home-assistant locked and limited conversation to collaborators Sep 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants