LIFX: Move random hue initial color to the LIFXEffect base class
It's a reasonable default for several light effects.
This commit is contained in:
parent
8233f086cd
commit
ec490070ca
1 changed files with 1 additions and 5 deletions
|
@ -213,7 +213,7 @@ class LIFXEffect(object):
|
||||||
|
|
||||||
def from_poweroff_hsbk(self, light, **kwargs):
|
def from_poweroff_hsbk(self, light, **kwargs):
|
||||||
"""Return the color when starting from a powered off state."""
|
"""Return the color when starting from a powered off state."""
|
||||||
return None
|
return [random.randint(0, 65535), 65535, 0, NEUTRAL_WHITE]
|
||||||
|
|
||||||
|
|
||||||
class LIFXEffectBreathe(LIFXEffect):
|
class LIFXEffectBreathe(LIFXEffect):
|
||||||
|
@ -326,10 +326,6 @@ class LIFXEffectColorloop(LIFXEffect):
|
||||||
|
|
||||||
yield from asyncio.sleep(period)
|
yield from asyncio.sleep(period)
|
||||||
|
|
||||||
def from_poweroff_hsbk(self, light, **kwargs):
|
|
||||||
"""Start from a random hue."""
|
|
||||||
return [random.randint(0, 65535), 65535, 0, NEUTRAL_WHITE]
|
|
||||||
|
|
||||||
|
|
||||||
class LIFXEffectStop(LIFXEffect):
|
class LIFXEffectStop(LIFXEffect):
|
||||||
"""A no-op effect, but starting it will stop an existing effect."""
|
"""A no-op effect, but starting it will stop an existing effect."""
|
||||||
|
|
Loading…
Add table
Reference in a new issue