-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ok, I did need it. Steady re-instated.
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |