Replace auto-start with startup automation, add card colors to dashboard
- Add `startup` automation condition type that activates on server boot, replacing the per-target `auto_start` flag - Remove `auto_start` field from targets, scene snapshots, and all API layers - Remove auto-start UI section and star buttons from dashboard and target cards - Remove `color` field from scene presets (backend, API, modal, frontend) - Add card color support to scene preset cards (color picker + border style) - Show localStorage-backed card colors on all dashboard cards (targets, automations, sync clocks, scene presets) - Fix card color picker updating wrong card when duplicate data attributes exist by using closest() from picker wrapper instead of global querySelector - Add sync clocks step to Sources tab tutorial - Bump SW cache v9 → v10 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ from wled_controller.storage.automation import (
|
||||
Condition,
|
||||
DisplayStateCondition,
|
||||
MQTTCondition,
|
||||
StartupCondition,
|
||||
SystemIdleCondition,
|
||||
TimeOfDayCondition,
|
||||
WebhookCondition,
|
||||
@@ -204,7 +205,7 @@ class AutomationEngine:
|
||||
fullscreen_procs: Set[str],
|
||||
idle_seconds: Optional[float], display_state: Optional[str],
|
||||
) -> bool:
|
||||
if isinstance(condition, AlwaysCondition):
|
||||
if isinstance(condition, (AlwaysCondition, StartupCondition)):
|
||||
return True
|
||||
if isinstance(condition, ApplicationCondition):
|
||||
return self._evaluate_app_condition(condition, running_procs, topmost_proc, topmost_fullscreen, fullscreen_procs)
|
||||
|
||||
@@ -38,7 +38,6 @@ def capture_current_snapshot(
|
||||
color_strip_source_id=getattr(t, "color_strip_source_id", ""),
|
||||
brightness_value_source_id=getattr(t, "brightness_value_source_id", ""),
|
||||
fps=getattr(t, "fps", 30),
|
||||
auto_start=getattr(t, "auto_start", False),
|
||||
))
|
||||
|
||||
return targets
|
||||
@@ -83,9 +82,6 @@ async def apply_scene_state(
|
||||
changed["brightness_value_source_id"] = ts.brightness_value_source_id
|
||||
if getattr(target, "fps", None) != ts.fps:
|
||||
changed["fps"] = ts.fps
|
||||
if getattr(target, "auto_start", None) != ts.auto_start:
|
||||
changed["auto_start"] = ts.auto_start
|
||||
|
||||
if changed:
|
||||
target.update_fields(**changed)
|
||||
target_store.update_target(ts.target_id, **changed)
|
||||
|
||||
Reference in New Issue
Block a user