Skip to content

LIFX: Move light effects to external library#8222

Merged
balloob merged 2 commits into
home-assistant:devfrom
amelchio:lifx-external-effects
Jun 27, 2017
Merged

LIFX: Move light effects to external library#8222
balloob merged 2 commits into
home-assistant:devfrom
amelchio:lifx-external-effects

Conversation

@amelchio
Copy link
Copy Markdown
Contributor

@amelchio amelchio commented Jun 26, 2017

Description:

This moves the LIFX light effect logic to the external library aiolifx_effects.

Breaking change note: The lifx_effect_breathe call was deprecated in version 0.47 and has now been removed. You can use lifx_effect_pulse with mode: breathe for the same effect.

Checklist:

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

  • Local tests with tox run successfully.
  • 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.

This moves the LIFX light effects to the external library aiolifx_effects.

To get the light state synchronized between that library and HA, the LIFX
platform no longer maintains the light state itself. Instead, it uses the
cached state that aiolifx maintains.

The reorganization also includes the addition of a cleanup handler.
@mention-bot
Copy link
Copy Markdown

@amelchio, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fabaff, @arsaboo and @shmuelzon to be potential reviewers.

hsbk = [hue, saturation, brightness, kelvin]
return None if hsbk == [None]*4 else hsbk

def merge_hsbk(base, change):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

expected 2 blank lines, found 1


return True

def find_hsbk(**kwargs):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

expected 2 blank lines, found 1

@balloob
Copy link
Copy Markdown
Member

balloob commented Jun 27, 2017

Awesome! 🐬

@balloob balloob merged commit af54311 into home-assistant:dev Jun 27, 2017
@amelchio amelchio mentioned this pull request Jun 27, 2017
1 task
@balloob balloob mentioned this pull request Jul 1, 2017
dethpickle pushed a commit to dethpickle/home-assistant that referenced this pull request Aug 18, 2017
* LIFX: Move light effects to external library

This moves the LIFX light effects to the external library aiolifx_effects.

To get the light state synchronized between that library and HA, the LIFX
platform no longer maintains the light state itself. Instead, it uses the
cached state that aiolifx maintains.

The reorganization also includes the addition of a cleanup handler.

* Fix style
@home-assistant home-assistant locked and limited conversation to collaborators Oct 20, 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.

5 participants