Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/wled/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,13 @@ class Segment(BaseModel):
from top-left corner of the matrix.
"""

cct: int = field(default=0)
"""White spectrum color temperature.

0 indicates the warmest possible color temperature,
255 indicates the coldest temperature
"""


@dataclass(kw_only=True)
class Leds:
Expand Down
3 changes: 3 additions & 0 deletions src/wled/wled.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ async def segment( # noqa: PLR0912, PLR0913
start: int | None = None,
stop: int | None = None,
transition: int | None = None,
cct: int | None = None,
) -> None:
"""Change state of a WLED Light segment.

Expand Down Expand Up @@ -355,6 +356,7 @@ async def segment( # noqa: PLR0912, PLR0913
transition: Duration of the crossfade between different
colors/brightness levels. One unit is 100ms, so a value of 4
results in a transition of 400ms.
cct: White spectrum color temperature.

Raises:
------
Expand Down Expand Up @@ -383,6 +385,7 @@ async def segment( # noqa: PLR0912, PLR0913
"start": start,
"stop": stop,
"sx": speed,
"cct": cct,
}

# Find effect if it was based on a name
Expand Down