Remove all migration logic, scroll tutorial targets into view, mock URL uses device ID

- Remove legacy migration code: profiles→automations key fallbacks, segments array
  fallback, standby_interval compat, profile_id compat, wled→led type mapping,
  legacy calibration field, audio CSS migration, default template migration,
  loadTargets alias, wled sub-tab mapping
- Scroll tutorial step targets into view when off-screen
- Mock device URL changed from mock://{led_count} to mock://{device_id},
  hide mock URL badge on device cards

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 18:31:41 +03:00
parent 39b31aec34
commit 0eb0f44ddb
12 changed files with 26 additions and 172 deletions
@@ -105,26 +105,16 @@ class WledPictureTarget(PictureTarget):
@classmethod
def from_dict(cls, data: dict) -> "WledPictureTarget":
"""Create from dictionary with backward compatibility."""
# New format: direct color_strip_source_id
if "color_strip_source_id" in data:
css_id = data["color_strip_source_id"]
# Old format: segments array — take first segment's css_id
elif "segments" in data:
segs = data["segments"]
css_id = segs[0].get("color_strip_source_id", "") if segs else ""
else:
css_id = ""
"""Create from dictionary."""
return cls(
id=data["id"],
name=data["name"],
target_type="led",
device_id=data.get("device_id", ""),
color_strip_source_id=css_id,
color_strip_source_id=data.get("color_strip_source_id", ""),
brightness_value_source_id=data.get("brightness_value_source_id", ""),
fps=data.get("fps", 30),
keepalive_interval=data.get("keepalive_interval", data.get("standby_interval", 1.0)),
keepalive_interval=data.get("keepalive_interval", 1.0),
state_check_interval=data.get("state_check_interval", DEFAULT_STATE_CHECK_INTERVAL),
min_brightness_threshold=data.get("min_brightness_threshold", 0),
adaptive_fps=data.get("adaptive_fps", False),