feat: expand color strip sources with gradient references and effect improvements

Add gradient_id field to color strip sources for referencing reusable
gradient entities. Improve audio stream processing and effect stream
with new parameters.
This commit is contained in:
2026-03-24 13:58:33 +03:00
parent 6a881f8fdd
commit 227b82f522
8 changed files with 109 additions and 12 deletions

View File

@@ -567,6 +567,13 @@ async def preview_color_strip_ws(
if not stream_cls:
raise ValueError(f"Unsupported preview source_type: {source.source_type}")
s = stream_cls(source)
# Inject gradient store for palette resolution
if hasattr(s, "set_gradient_store"):
try:
from wled_controller.api.dependencies import get_gradient_store
s.set_gradient_store(get_gradient_store())
except Exception:
pass
if hasattr(s, "configure"):
s.configure(led_count)
# Inject sync clock if requested