Skip to content

Commit

Permalink
Ok, I did need it. Steady re-instated.
Browse files Browse the repository at this point in the history
  • Loading branch information
JnyJny committed Jun 29, 2022
1 parent 3cc2b16 commit bd18fe4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions busylight/effects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
from .blink import Blink
from .gradient import Gradient
from .spectrum import Spectrum
from .steady import Steady

__all__ = [
"Effects",
"Blink",
"Gradient",
"Spectrum",
"Steady",
]
28 changes: 28 additions & 0 deletions busylight/effects/steady.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""
"""

from typing import List

from ..color import ColorList, ColorTuple
from .effect import BaseEffect


class Steady(BaseEffect):
def __init__(self, color: ColorTuple) -> None:
self.color = color

def __repr__(self) -> str:
return f"{self.name}(color={self.color!r})"

@property
def duty_cycle(self) -> float:
return 86400

@property
def colors(self) -> ColorList:
try:
return self._colors
except AttributeError:
pass
self._colors = [self.color]
return self._colors

0 comments on commit bd18fe4

Please sign in to comment.