File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 6
6
from .blink import Blink
7
7
from .gradient import Gradient
8
8
from .spectrum import Spectrum
9
+ from .steady import Steady
9
10
10
11
__all__ = [
11
12
"Effects" ,
12
13
"Blink" ,
13
14
"Gradient" ,
14
15
"Spectrum" ,
16
+ "Steady" ,
15
17
]
Original file line number Diff line number Diff line change
1
+ """
2
+ """
3
+
4
+ from typing import List
5
+
6
+ from ..color import ColorList , ColorTuple
7
+ from .effect import BaseEffect
8
+
9
+
10
+ class Steady (BaseEffect ):
11
+ def __init__ (self , color : ColorTuple ) -> None :
12
+ self .color = color
13
+
14
+ def __repr__ (self ) -> str :
15
+ return f"{ self .name } (color={ self .color !r} )"
16
+
17
+ @property
18
+ def duty_cycle (self ) -> float :
19
+ return 86400
20
+
21
+ @property
22
+ def colors (self ) -> ColorList :
23
+ try :
24
+ return self ._colors
25
+ except AttributeError :
26
+ pass
27
+ self ._colors = [self .color ]
28
+ return self ._colors
You can’t perform that action at this time.
0 commit comments