Rename profiles to automations across backend and frontend
Rename the "profiles" entity to "automations" throughout the entire codebase for clarity. Updates Python models, storage, API routes/schemas, engine, frontend JS modules, HTML templates, CSS classes, i18n keys (en/ru/zh), dashboard, tutorials, and command palette. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,9 +27,9 @@ from wled_controller.storage.audio_source_store import AudioSourceStore
|
||||
from wled_controller.storage.audio_template_store import AudioTemplateStore
|
||||
import wled_controller.core.audio # noqa: F401 — trigger engine auto-registration
|
||||
from wled_controller.storage.value_source_store import ValueSourceStore
|
||||
from wled_controller.storage.profile_store import ProfileStore
|
||||
from wled_controller.storage.automation_store import AutomationStore
|
||||
from wled_controller.storage.scene_preset_store import ScenePresetStore
|
||||
from wled_controller.core.profiles.profile_engine import ProfileEngine
|
||||
from wled_controller.core.automations.automation_engine import AutomationEngine
|
||||
from wled_controller.core.mqtt.mqtt_service import MQTTService
|
||||
from wled_controller.core.devices.mqtt_client import set_mqtt_service
|
||||
from wled_controller.core.backup.auto_backup import AutoBackupEngine
|
||||
@@ -54,7 +54,7 @@ color_strip_store = ColorStripStore(config.storage.color_strip_sources_file)
|
||||
audio_source_store = AudioSourceStore(config.storage.audio_sources_file)
|
||||
audio_template_store = AudioTemplateStore(config.storage.audio_templates_file)
|
||||
value_source_store = ValueSourceStore(config.storage.value_sources_file)
|
||||
profile_store = ProfileStore(config.storage.profiles_file)
|
||||
automation_store = AutomationStore(config.storage.automations_file)
|
||||
scene_preset_store = ScenePresetStore(config.storage.scene_presets_file)
|
||||
|
||||
# Migrate embedded audio config from CSS entities to audio sources
|
||||
@@ -108,9 +108,9 @@ async def lifespan(app: FastAPI):
|
||||
mqtt_service = MQTTService(config.mqtt)
|
||||
set_mqtt_service(mqtt_service)
|
||||
|
||||
# Create profile engine (needs processor_manager + mqtt_service + stores for scene activation)
|
||||
profile_engine = ProfileEngine(
|
||||
profile_store, processor_manager,
|
||||
# Create automation engine (needs processor_manager + mqtt_service + stores for scene activation)
|
||||
automation_engine = AutomationEngine(
|
||||
automation_store, processor_manager,
|
||||
mqtt_service=mqtt_service,
|
||||
scene_preset_store=scene_preset_store,
|
||||
target_store=picture_target_store,
|
||||
@@ -136,9 +136,9 @@ async def lifespan(app: FastAPI):
|
||||
audio_source_store=audio_source_store,
|
||||
audio_template_store=audio_template_store,
|
||||
value_source_store=value_source_store,
|
||||
profile_store=profile_store,
|
||||
automation_store=automation_store,
|
||||
scene_preset_store=scene_preset_store,
|
||||
profile_engine=profile_engine,
|
||||
automation_engine=automation_engine,
|
||||
auto_backup_engine=auto_backup_engine,
|
||||
)
|
||||
|
||||
@@ -180,8 +180,8 @@ async def lifespan(app: FastAPI):
|
||||
# Start MQTT service (broker connection for output, triggers, state)
|
||||
await mqtt_service.start()
|
||||
|
||||
# Start profile engine (evaluates conditions and auto-starts/stops targets)
|
||||
await profile_engine.start()
|
||||
# Start automation engine (evaluates conditions and activates scenes)
|
||||
await automation_engine.start()
|
||||
|
||||
# Start auto-backup engine (periodic configuration backups)
|
||||
await auto_backup_engine.start()
|
||||
@@ -210,12 +210,12 @@ async def lifespan(app: FastAPI):
|
||||
except Exception as e:
|
||||
logger.error(f"Error stopping auto-backup engine: {e}")
|
||||
|
||||
# Stop profile engine first (deactivates profile-managed targets)
|
||||
# Stop automation engine first (deactivates automation-managed scenes)
|
||||
try:
|
||||
await profile_engine.stop()
|
||||
logger.info("Stopped profile engine")
|
||||
await automation_engine.stop()
|
||||
logger.info("Stopped automation engine")
|
||||
except Exception as e:
|
||||
logger.error(f"Error stopping profile engine: {e}")
|
||||
logger.error(f"Error stopping automation engine: {e}")
|
||||
|
||||
# Stop all processing
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user