Add clone support for scene and automation cards, update sync clock descriptions
- Scene clone: opens capture modal with prefilled name/description/targets instead of server-side duplication; removed backend clone endpoint - Automation clone: opens editor with prefilled conditions, scene, logic, deactivation mode (webhook tokens stripped for uniqueness) - Updated sync clock i18n descriptions to reflect speed-only-on-clock model - Added entity card clone pattern documentation to server/CLAUDE.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -117,25 +117,6 @@ class ScenePresetStore:
|
||||
logger.info(f"Recaptured scene preset: {preset_id}")
|
||||
return existing
|
||||
|
||||
def clone_preset(self, preset_id: str) -> ScenePreset:
|
||||
"""Duplicate an existing preset with a new ID and '(Copy)' suffix."""
|
||||
if preset_id not in self._presets:
|
||||
raise ValueError(f"Scene preset not found: {preset_id}")
|
||||
|
||||
source = self._presets[preset_id]
|
||||
new_id = f"scene_{uuid.uuid4().hex[:8]}"
|
||||
cloned = ScenePreset(
|
||||
id=new_id,
|
||||
name=f"{source.name} (Copy)",
|
||||
description=source.description,
|
||||
targets=[TargetSnapshot.from_dict(t.to_dict()) for t in source.targets],
|
||||
order=source.order,
|
||||
)
|
||||
self._presets[new_id] = cloned
|
||||
self._save()
|
||||
logger.info(f"Cloned scene preset: {preset_id} -> {new_id}")
|
||||
return cloned
|
||||
|
||||
def delete_preset(self, preset_id: str) -> None:
|
||||
if preset_id not in self._presets:
|
||||
raise ValueError(f"Scene preset not found: {preset_id}")
|
||||
|
||||
Reference in New Issue
Block a user