feat(scene): refactor scene automation into modular trigger-action system
- Support manual one-tap commands and automatic condition-based rules - Add modular triggers (time, temperature, humidity, device state) - Add modular conditions (environment thresholds, socket state, time range) - Upgrade actions to support virtual remotes, sockets, delays, and notifications - Support sequential/parallel concurrency mode and error execution strategies - Refactor SceneListScreen with filter tabs, quick execution, and enable switches - Refactor SceneEditorScreen with modular builders and preset pickers - Enhance SceneExecutionScreen with step timing, skips, and rerun capability - Add comprehensive domain and UI ViewModel unit tests
This commit is contained in:
@@ -42,44 +42,124 @@
|
||||
<string name="activity_placeholder_title">Activity Log</string>
|
||||
<string name="activity_placeholder_description">No recorded events yet.</string>
|
||||
|
||||
<!-- Scene: list -->
|
||||
<string name="scene_list_title">Scenes</string>
|
||||
<string name="scene_create_action">New scene</string>
|
||||
<!-- Scene & Automation strings -->
|
||||
<string name="scene_list_title">Automation & Scenes</string>
|
||||
<string name="scene_tab_all">All</string>
|
||||
<string name="scene_tab_manual">Manual</string>
|
||||
<string name="scene_tab_automatic">Automatic</string>
|
||||
<string name="scene_create_manual">New Manual Command</string>
|
||||
<string name="scene_create_automatic">New Automatic Rule</string>
|
||||
<string name="scene_create_action">New Command</string>
|
||||
<string name="scene_action_count">%1$d actions</string>
|
||||
<string name="scene_edit">Edit scene</string>
|
||||
<string name="scene_delete">Delete scene</string>
|
||||
<string name="scene_empty_title">No scenes yet</string>
|
||||
<string name="scene_empty_message">Create your first scene to combine socket and infrared actions.</string>
|
||||
<string name="scene_edit">Edit Command</string>
|
||||
<string name="scene_delete">Delete Command</string>
|
||||
<string name="scene_empty_title">No automation commands yet</string>
|
||||
<string name="scene_empty_message">Tap the button below to create instant commands or trigger-based automatic rules.</string>
|
||||
<string name="scene_action_run_now">Run Now</string>
|
||||
<string name="scene_toast_executed">Command triggered</string>
|
||||
|
||||
<!-- Scene: delete dialog -->
|
||||
<string name="scene_delete_dialog_title">Delete scene</string>
|
||||
<string name="scene_delete_dialog_message">This action cannot be undone.</string>
|
||||
<string name="scene_delete_dialog_title">Delete Command</string>
|
||||
<string name="scene_delete_dialog_message">Are you sure you want to delete this command? This cannot be undone.</string>
|
||||
<string name="scene_delete_confirm">Delete</string>
|
||||
<string name="scene_delete_cancel">Cancel</string>
|
||||
|
||||
<!-- Scene: editor -->
|
||||
<string name="scene_editor_new_title">New scene</string>
|
||||
<string name="scene_editor_edit_title">Edit scene</string>
|
||||
<string name="scene_editor_manual_title">Create Manual Command</string>
|
||||
<string name="scene_editor_auto_title">Create Automatic Rule</string>
|
||||
<string name="scene_editor_edit_title">Edit Command</string>
|
||||
<string name="scene_back">Back</string>
|
||||
<string name="scene_name_label">Name</string>
|
||||
<string name="scene_icon_label">Icon</string>
|
||||
<string name="scene_color_label">Accent color (hex)</string>
|
||||
<string name="scene_actions_label">Actions (%1$d)</string>
|
||||
<string name="scene_add_socket_action">Add socket action</string>
|
||||
<string name="scene_add_infrared_action">Add infrared action</string>
|
||||
<string name="scene_device_name_label">Device name</string>
|
||||
<string name="scene_infrared_key_label">Infrared key</string>
|
||||
<string name="scene_name_label">Title</string>
|
||||
<string name="scene_name_hint">Enter title (e.g. Movie Night, High Temp Auto Cooling)</string>
|
||||
<string name="scene_description_label">Description</string>
|
||||
<string name="scene_description_hint">Optional notes or details about this rule</string>
|
||||
|
||||
<!-- Sections -->
|
||||
<string name="scene_section_triggers">Triggers</string>
|
||||
<string name="scene_section_conditions">Conditions (Optional)</string>
|
||||
<string name="scene_section_actions">Actions</string>
|
||||
<string name="scene_section_advanced">Advanced Options</string>
|
||||
<string name="scene_section_other">Other Options & Appearance</string>
|
||||
|
||||
<!-- Add Buttons -->
|
||||
<string name="scene_add_trigger">+ Add Trigger</string>
|
||||
<string name="scene_add_condition">+ Add Condition</string>
|
||||
<string name="scene_add_action_btn">+ Add Action</string>
|
||||
<string name="scene_add_action">Add</string>
|
||||
<string name="scene_save_action">Save scene</string>
|
||||
<string name="scene_action_socket">Socket %1$s -> %2$s</string>
|
||||
<string name="scene_action_infrared">Infrared %1$s -> %2$s</string>
|
||||
<string name="scene_save_action">Save Command</string>
|
||||
|
||||
<!-- Strategies & Toggles -->
|
||||
<string name="scene_repeat_strategy">Repeat Execution Strategy</string>
|
||||
<string name="scene_strategy_continue">Continue new task</string>
|
||||
<string name="scene_concurrency_mode">Concurrency Mode</string>
|
||||
<string name="scene_concurrency_sync">Synchronous (Sequential)</string>
|
||||
<string name="scene_concurrency_async">Asynchronous (Parallel)</string>
|
||||
<string name="scene_error_policy">On Error Policy</string>
|
||||
<string name="scene_policy_continue">Continue subsequent actions</string>
|
||||
<string name="scene_policy_abort">Abort remaining actions</string>
|
||||
<string name="scene_appearance_icon">Icon</string>
|
||||
<string name="scene_appearance_color">Icon Background Color</string>
|
||||
<string name="scene_enable_rule">Enable this automatic rule</string>
|
||||
<string name="scene_enable_logging">Enable command execution logs</string>
|
||||
|
||||
<!-- Trigger Types & Dialog -->
|
||||
<string name="scene_dialog_add_trigger_title">Select Trigger Type</string>
|
||||
<string name="scene_trigger_type_time">⏰ Time / Schedule Trigger</string>
|
||||
<string name="scene_trigger_type_temp">🌡️ Temperature Threshold</string>
|
||||
<string name="scene_trigger_type_humidity">💧 Humidity Threshold</string>
|
||||
<string name="scene_trigger_type_device">🔌 Socket State Changed</string>
|
||||
<string name="scene_trigger_time_label">Trigger Time (e.g. 07:30)</string>
|
||||
<string name="scene_trigger_temp_threshold">Temperature Threshold (°C)</string>
|
||||
<string name="scene_trigger_humidity_threshold">Humidity Threshold (%)</string>
|
||||
<string name="scene_operator_label">Condition</string>
|
||||
<string name="scene_operator_gt">Greater than (>)</string>
|
||||
<string name="scene_operator_lt">Less than (<)</string>
|
||||
<string name="scene_operator_eq">Equals (=)</string>
|
||||
|
||||
<!-- Condition Types & Dialog -->
|
||||
<string name="scene_dialog_add_condition_title">Select Condition</string>
|
||||
<string name="scene_condition_type_temp">🌡️ Temperature Range</string>
|
||||
<string name="scene_condition_type_humidity">💧 Humidity Range</string>
|
||||
<string name="scene_condition_type_socket">🔌 Current Socket Power</string>
|
||||
<string name="scene_condition_type_time_range">🕒 Active Time Range</string>
|
||||
<string name="scene_condition_start_time">Start Time (e.g. 22:00)</string>
|
||||
<string name="scene_condition_end_time">End Time (e.g. 07:00)</string>
|
||||
|
||||
<!-- Action Types & Dialog -->
|
||||
<string name="scene_dialog_add_action_title">Select Action</string>
|
||||
<string name="scene_action_type_socket">🔌 Smart Socket Control</string>
|
||||
<string name="scene_action_type_virtual_remote">📺 Infrared Remote Button</string>
|
||||
<string name="scene_action_type_delay">⏱️ Delay / Buffer Timer</string>
|
||||
<string name="scene_action_type_notification">🔔 System Notification</string>
|
||||
<string name="scene_select_socket">Select Target Socket</string>
|
||||
<string name="scene_socket_power_state">Target Power State</string>
|
||||
<string name="scene_select_virtual_remote">Select Virtual Remote</string>
|
||||
<string name="scene_select_remote_button">Select Remote Key</string>
|
||||
<string name="scene_delay_duration_label">Delay Duration (seconds)</string>
|
||||
<string name="scene_notification_title_label">Notification Title</string>
|
||||
<string name="scene_notification_msg_label">Notification Message</string>
|
||||
<string name="scene_unit_seconds">%1$d sec</string>
|
||||
|
||||
<!-- Action Card Displays -->
|
||||
<string name="scene_action_socket">Socket [%1$s]: Set %2$s</string>
|
||||
<string name="scene_action_remote">Remote [%1$s]: Send %2$s</string>
|
||||
<string name="scene_action_infrared">Infrared [%1$s]: Slot %2$s</string>
|
||||
<string name="scene_action_delay">⏱️ Delay %1$d seconds</string>
|
||||
<string name="scene_action_notification">🔔 Notify: %1$s</string>
|
||||
|
||||
<!-- Scene: execution -->
|
||||
<string name="scene_execution_title">Run scene</string>
|
||||
<string name="scene_execution_title">Execute Command</string>
|
||||
<string name="scene_execution_run">Run</string>
|
||||
<string name="scene_execution_running">Running %1$s…</string>
|
||||
<string name="scene_execution_running">Running: %1$s…</string>
|
||||
<string name="scene_execution_summary">%1$d succeeded, %2$d failed of %3$d actions</string>
|
||||
<string name="scene_execution_done">Done</string>
|
||||
<string name="scene_execution_done">Execution Completed</string>
|
||||
<string name="scene_execution_duration">Total Elapsed: %1$s ms</string>
|
||||
<string name="scene_step_pending">Pending</string>
|
||||
<string name="scene_step_running">Running…</string>
|
||||
<string name="scene_step_delaying">Waiting (%1$d s)…</string>
|
||||
<string name="scene_step_success">Completed</string>
|
||||
<string name="scene_step_failed">Failed</string>
|
||||
<string name="scene_step_skipped">Skipped</string>
|
||||
|
||||
<!-- Device list -->
|
||||
<string name="device_list_title">Device List</string>
|
||||
|
||||
Reference in New Issue
Block a user