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:
2026-02-18 13:42:05 +03:00
parent fc779eef39
commit d6cf45c873
13 changed files with 349 additions and 48 deletions

View File

@@ -158,6 +158,9 @@
"device.health.online": "Online",
"device.health.offline": "Offline",
"device.health.checking": "Checking...",
"device.static_color": "Idle Color",
"device.static_color.hint": "Color shown when device is idle",
"device.static_color.clear": "Clear idle color",
"device.tutorial.start": "Start tutorial",
"device.tip.metadata": "Device info (LED count, type, color channels) is auto-detected from the device",
"device.tip.brightness": "Slide to adjust device brightness",
@@ -184,6 +187,8 @@
"settings.button.cancel": "Cancel",
"settings.health_interval": "Health Check Interval (s):",
"settings.health_interval.hint": "How often to check the device status (5-600 seconds)",
"settings.auto_shutdown": "Auto Restore:",
"settings.auto_shutdown.hint": "Restore device to idle state when targets stop or server shuts down",
"settings.button.save": "Save Changes",
"settings.saved": "Settings saved successfully",
"settings.failed": "Failed to save settings",

View File

@@ -158,6 +158,9 @@
"device.health.online": "Онлайн",
"device.health.offline": "Недоступен",
"device.health.checking": "Проверка...",
"device.static_color": "Цвет ожидания",
"device.static_color.hint": "Цвет, когда устройство в режиме ожидания",
"device.static_color.clear": "Очистить цвет ожидания",
"device.tutorial.start": "Начать обучение",
"device.tip.metadata": "Информация об устройстве (кол-во LED, тип, цветовые каналы) определяется автоматически",
"device.tip.brightness": "Перетащите для регулировки яркости",
@@ -184,6 +187,8 @@
"settings.button.cancel": "Отмена",
"settings.health_interval": "Интервал Проверки (с):",
"settings.health_interval.hint": "Как часто проверять статус устройства (5-600 секунд)",
"settings.auto_shutdown": "Авто-восстановление:",
"settings.auto_shutdown.hint": "Восстанавливать устройство в режим ожидания при остановке целей или сервера",
"settings.button.save": "Сохранить Изменения",
"settings.saved": "Настройки успешно сохранены",
"settings.failed": "Не удалось сохранить настройки",