Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new DIY Automation system to the app, enabling users to create custom automations based on device states and triggers. The changes include new domain models for automations, triggers, states, and actions, a repository for storing and managing automations, and a service/manager infrastructure for running these automations. It also includes necessary initialization and dependency updates, as well as integration with the app's UI.
DIY Automation Framework
Automation,Trigger,State, andAction, each with extensible sealed interfaces and predefined types for common automation scenarios. [1] [2] [3] [4]DIYRepository, a singleton for storing, serializing, deserializing, and managing automations using shared preferences and Gson with sealed class support.Automation Execution Infrastructure
AutomationManagerandAutomationServiceto manage and execute automations, including module lifecycle management and foreground service operation with notification support. [1] [2]AutomationServiceinAndroidManifest.xmlwith appropriate foreground service configuration.App Integration & Initialization
DIYRepositoryandAutomationManagerinEssentialsAppto ensure automations are loaded and managed on app startup.SettingsRepositoryto include automation preferences in config export.DIYScreenin the main activity, connecting the new automation UI. [1] [2]Dependency Updates
Manifest & Activity Updates
AutomationEditorActivityand movedAppFreezingActivityto a new package in the manifest for better organization.