Skip to content

Commit bbf9e9a

Browse files
authored
Add CCT support (#1367)
1 parent eefe67e commit bbf9e9a

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/wled/models.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,13 @@ class Segment(BaseModel):
287287
from top-left corner of the matrix.
288288
"""
289289

290+
cct: int = field(default=0)
291+
"""White spectrum color temperature.
292+
293+
0 indicates the warmest possible color temperature,
294+
255 indicates the coldest temperature
295+
"""
296+
290297

291298
@dataclass(kw_only=True)
292299
class Leds:

src/wled/wled.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ async def segment( # noqa: PLR0912, PLR0913
327327
start: int | None = None,
328328
stop: int | None = None,
329329
transition: int | None = None,
330+
cct: int | None = None,
330331
) -> None:
331332
"""Change state of a WLED Light segment.
332333
@@ -355,6 +356,7 @@ async def segment( # noqa: PLR0912, PLR0913
355356
transition: Duration of the crossfade between different
356357
colors/brightness levels. One unit is 100ms, so a value of 4
357358
results in a transition of 400ms.
359+
cct: White spectrum color temperature.
358360
359361
Raises:
360362
------
@@ -383,6 +385,7 @@ async def segment( # noqa: PLR0912, PLR0913
383385
"start": start,
384386
"stop": stop,
385387
"sx": speed,
388+
"cct": cct,
386389
}
387390

388391
# Find effect if it was based on a name

0 commit comments

Comments
 (0)