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
3 changes: 3 additions & 0 deletions src/wled/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ class Segment(BaseModel):
~ to increment, ~- to decrement, or "r" for random.
"""

freeze: bool = field(default=False, metadata=field_options(alias="frz"))
"""Freeze the current segment state."""

intensity: int | str = field(default=0, metadata=field_options(alias="ix"))
"""Intensity of the segment.

Expand Down
3 changes: 3 additions & 0 deletions src/wled/wled.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ async def segment( # noqa: PLR0912, PLR0913
color_secondary: tuple[int, int, int, int] | tuple[int, int, int] | None = None,
color_tertiary: tuple[int, int, int, int] | tuple[int, int, int] | None = None,
effect: int | str | None = None,
freeze: bool | None = None,
individual: Sequence[
int | Sequence[int] | tuple[int, int, int, int] | tuple[int, int, int]
]
Expand Down Expand Up @@ -340,6 +341,7 @@ async def segment( # noqa: PLR0912, PLR0913
color_secondary: The secondary color of this segment.
color_tertiary: The tertiary color of this segment.
effect: The effect number (or name) to use on this segment.
freeze: Freeze the current segment state.
individual: A list of colors to use for each LED in the segment.
intensity: The effect intensity to use on this segment.
length: The length of this segment.
Expand Down Expand Up @@ -374,6 +376,7 @@ async def segment( # noqa: PLR0912, PLR0913
segment = {
"bri": brightness,
"cln": clones,
"frz": freeze,
"fx": effect,
"i": individual,
"ix": intensity,
Expand Down
Loading
Loading