Add static color for simple devices, change auto-shutdown to auto-restore
- Add `static_color` capability to Adalight provider with `set_color()` method
- Add `static_color` field to Device model, DeviceState, and API schemas
- Add GET/PUT `/devices/{id}/color` API endpoints
- Change auto-shutdown behavior: restore device to idle state instead of
powering off (WLED uses snapshot/restore, Adalight sends static color
or black frame)
- Rename `_auto_shutdown_device_if_idle` to `_restore_device_idle_state`
- Add inline color picker on device cards for devices with static_color
- Add auto_shutdown toggle to device settings modal
- Update labels from "Auto Shutdown" to "Auto Restore" (en + ru)
- Remove backward-compat KC aliases from ProcessorManager
- Align card action buttons to bottom with flex column layout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -251,9 +251,11 @@ def test_get_target_metrics(processor_manager):
|
||||
assert metrics["errors_count"] == 0
|
||||
|
||||
|
||||
def test_is_kc_target(processor_manager):
|
||||
"""Test KC target type detection."""
|
||||
def test_target_type_detection(processor_manager):
|
||||
"""Test target type detection via processor instances."""
|
||||
from wled_controller.storage.key_colors_picture_target import KeyColorsSettings
|
||||
from wled_controller.core.processing.kc_target_processor import KCTargetProcessor
|
||||
from wled_controller.core.processing.wled_target_processor import WledTargetProcessor
|
||||
|
||||
processor_manager.add_device(
|
||||
device_id="test_device",
|
||||
@@ -272,8 +274,8 @@ def test_is_kc_target(processor_manager):
|
||||
settings=KeyColorsSettings(),
|
||||
)
|
||||
|
||||
assert processor_manager.is_kc_target("kc_target") is True
|
||||
assert processor_manager.is_kc_target("wled_target") is False
|
||||
assert isinstance(processor_manager._processors["kc_target"], KCTargetProcessor)
|
||||
assert isinstance(processor_manager._processors["wled_target"], WledTargetProcessor)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user