Simplify scenes to capture only target state, add target selector

- Remove DeviceBrightnessSnapshot and AutomationSnapshot from scene data model
- Simplify capture_current_snapshot and apply_scene_state to targets only
- Remove device/automation dependencies from scene preset API routes
- Add target selector (combobox + add/remove) to scene capture modal
- Fix stale profiles reference bug in scene_preset_store recapture
- Update automation engine call sites for simplified scene functions
- Sync scene presets cache between automations and scene-presets modules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 18:55:11 +03:00
parent 0eb0f44ddb
commit ff4e7f8adb
14 changed files with 157 additions and 204 deletions

View File

@@ -36,6 +36,19 @@
<input type="color" id="scene-preset-editor-color" value="#4fc3f7">
</div>
<div class="form-group" id="scene-target-selector-group" style="display:none">
<div class="label-row">
<label data-i18n="scenes.targets">Targets:</label>
<button type="button" class="hint-toggle" onclick="toggleHint(this)" title="?">?</button>
</div>
<small class="input-hint" style="display:none" data-i18n="scenes.targets.hint">Select which targets to include in this scene snapshot</small>
<div class="scene-target-add-row">
<select id="scene-target-select"></select>
<button type="button" class="btn btn-sm btn-secondary" onclick="addSceneTarget()">+</button>
</div>
<div id="scene-target-list" class="scene-target-list"></div>
</div>
<div id="scene-preset-editor-error" class="error-message" style="display: none;"></div>
</form>
</div>