Skip to content
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

light.yeelight: catch i/o related exceptions from the backend lib #6952

Merged

Conversation

rytilahti
Copy link
Member

@rytilahti rytilahti commented Apr 5, 2017

Description:

Fixes/mitigates problems with #5949 and #6624

Related issue (if applicable): fixes #5949 #6624

Checklist:

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

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

@mention-bot
Copy link

@rytilahti, thanks for your PR! By analyzing the history of the files in this pull request, we identified @HydrelioxGitHub, @jjensn and @BillyNate to be potential reviewers.

self._bulb.start_flow(flow)
try:
self._bulb.start_flow(flow)
except yeelight.BulbException as ex:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined name 'yeelight'

@@ -255,7 +255,8 @@ def set_default(self) -> None:
def set_flash(self, flash) -> None:
"""Activate flash."""
if flash:
from yeelight import RGBTransition, SleepTransition, Flow
from yeelight import (RGBTransition, SleepTransition, Flow,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'yeelight.BulbException' imported but unused

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by forced push, it was used in the prefixed form below in the code.

@rytilahti rytilahti force-pushed the yeelight_catch_music_mode_exception branch from f717468 to 8c973ea Compare April 5, 2017 22:13
@balloob balloob added this to the 0.42 milestone Apr 7, 2017
@balloob balloob merged commit d952a07 into home-assistant:dev Apr 7, 2017
balloob pushed a commit that referenced this pull request Apr 8, 2017
@balloob
Copy link
Member

balloob commented Apr 8, 2017

Cherry-picked into the 0.42 branch

@fabaff fabaff mentioned this pull request Apr 8, 2017
@rytilahti rytilahti deleted the yeelight_catch_music_mode_exception branch April 8, 2017 13:34
@balloob balloob mentioned this pull request Apr 21, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Jul 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Yeelight Group Issue
6 participants