diff --git a/src/wled/models.py b/src/wled/models.py index 008c9721..52f94e87 100644 --- a/src/wled/models.py +++ b/src/wled/models.py @@ -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: diff --git a/src/wled/wled.py b/src/wled/wled.py index 17c53584..1e442bc4 100644 --- a/src/wled/wled.py +++ b/src/wled/wled.py @@ -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. @@ -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: ------ @@ -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