-
-
Notifications
You must be signed in to change notification settings - Fork 56
DIY Automation
sameerasw edited this page Aug 9, 2026
·
1 revision
DIY (Do It Yourself) lets you build custom automation rules directly in Essentials — no third-party apps required. Combine triggers (events that happen on your device) with actions (things Essentials does in response).
The DIY system is built around:
- Rules — a named automation with one trigger and one or more actions
- Triggers — events that fire the rule (time, app launch, notification, battery state, etc.)
- Actions — what happens when the trigger fires (toggle a feature, send a notification, run a shell command, etc.)
- GenAI Assist — optional AI-powered prompt generator to help build rules from natural language descriptions
- Open Essentials → DIY tab
- Tap the + button to create a new rule
- Choose a trigger
- Add one or more actions
- Name the rule and save
| Trigger | Description |
|---|---|
| App launched | Fires when a specific app comes to the foreground |
| App closed | Fires when a specific app leaves the foreground |
| Time of day | Fires at a scheduled time (supports daily/specific days) |
| Battery level | Fires when battery drops below or rises above a threshold |
| Charging state | Fires when device is plugged in or unplugged |
| Screen on/off | Fires when screen state changes |
| Notification received | Fires when a notification arrives from a selected app |
| Location | Fires when entering/leaving a geofenced area |
| Network change | Fires when connecting to or disconnecting from Wi-Fi |
| Bluetooth connection | Fires when a specific BT device connects/disconnects |
| Action | Description |
|---|---|
| Toggle feature | Enable or disable any Essentials feature |
| Set sound mode | Switch to Normal / Vibrate / Silent |
| Trigger QS tile | Activate a QS tile action |
| Send notification | Show a custom notification |
| Run shell command | Execute an ADB shell command (requires Shizuku/Root) |
| Launch app | Open a specific app |
| Set system setting | Write a value to Secure/System/Global settings |
| Wait | Pause before the next action (delay in seconds) |
The GenAI assist feature helps you create automation rules from natural language:
- Tap the AI button in the DIY rules editor
- Describe what you want in plain English (e.g., "Turn on night light when I open Kindle")
- The AI generates a rule suggestion
- Review and save the rule
- GenAI is powered by
GenAIAutomationServiceandDIYViewModel - The generated rules are fully editable before saving
Rules are stored in SettingsRepository using Gson JSON serialization under the DIY preference key. Each rule contains:
{
"id": "unique_rule_id",
"name": "Rule name",
"enabled": true,
"trigger": { "type": "APP_LAUNCHED", "packageName": "com.amazon.kindle" },
"actions": [
{ "type": "TOGGLE_FEATURE", "featureId": "Dynamic night light", "value": true }
]
}Rules are evaluated by EssentialsConditionProvider (a ConditionProviderService) and automation handlers in services/automation/. The condition provider listens for system events and checks if any rules match the current state.