Automating routine tasks on a smartphone saves time and makes it more comfortable to use the device. Xiaomi offers built-in tools for creating triggers - conditions under which the phone automatically performs a given action. For example, you can configure the inclusion of silent mode on a schedule, start music when connecting headphones or send SMS low-charge.
In this article, we will analyze all ways to configure triggers on Xiaomi (including models on the Internet). MIUI 14/15 From basic features to hidden features, youβll learn how to work with the Automation app, use Google Assistant for voice commands, and even create action chains with third-party utilities. No water β only proven instructions with explanations for beginners and advanced users.
What are triggers and why you need them on Xiaomi
A trigger is an event or condition that triggers an automated action on a smartphone. In the context of Xiaomi, triggers are implemented through:
- π± Built-in Automation application** (available on all devices with MIUI 12+ hyperos).
- π€ Voice commands via Google Assistant or Alice (for owners) Redmi/POCO Russian-made).
- βοΈ Third-party applications like MacroDroid or Tasker (for advanced scripts).
Examples of useful triggers:
- π Automatic sound shutdown in the geolocation office.
- π Power saving mode when the battery is below 20%.
- π§ Running Spotify when connecting Bluetooth headphones.
- π΅ Send a notification to relatives if the phone is discharged before 5%.
The main advantage of triggers on Xiaomi is that they work without root rights and do not require a permanent connection to the Internet (unlike cloud services like the Internet). IFTTT). But there are nuances:
β οΈ Note: On HyperOS devices (e.g. Xiaomi 14 or Redmi) K70) Automation menu moved to Settings β Special facilities β Automation. MIUI 13 and older way different: Settings β Additionally. β Automation.
Basic triggers: setup through the Automation app
Built-in Automation (or Automation in global firmware) allows you to create simple scripts without installing additional software. Consider a step-by-step instruction using the example of Redmi Note 12 with MIUI 14:
- Open the Settings. β Additionally. β Automation (or search by settings by entering AutomationΒ»).
- Click Add the rule (icon Β«+Β» top-right).
- Select a trigger from the proposed categories: β° Time/Date β for schedule actions. π Location - Geolocation scenarios. π Battery Charge β Reaction to the Level of Charge. πΆ Network β triggers when connecting to Wi-Fi or mobile data.
Set an action that will be executed when the trigger is triggered (for example, Do Not Disturb Mode or Launch an application).
Keep the rule by giving it a clear name (e.g., βSilent Mode at Workβ).
Example of setting up a trigger to automatically turn on Wi-Fi at home:
- Trigger: Location β House (indicate address on map).
- Action: Turn on Wi-Fi.
- Add the condition only if the screen is unlocked (so as not to waste battery power).
βοΈ Checking before saving the trigger
Extended scenarios: Combining triggers and actions
Xiaomi may not have enough built-in functionality to create complex automations (such as action chains or multi-trigger conditions), and MacroDroid, a free, intuitive Tasker-like app, will help in such cases.
An example of a complex scenario: Smart alarm clock, if you don't turn off your alarm for 5 minutes, your phone will flash and turn on music at full volume.
- Install MacroDroid from Google Play.
- Create a new macro team (Add Macro).
- Add the trigger: Alarm β The alarm went off.
- Add condition: Delay β 5 minutes (unless the alarm is switched off).
- Set the action: π¦ Outbreak. β Blink. π΅ Media β Play music (specify track). π Sound. β Set the volume to 100%.
The advantages of MacroDroid over built-in automation:
| Function | Xiaomi's built-in automation | MacroDroid |
|---|---|---|
| Number of triggers in one rule | 1 | Unlimitedly. |
| Conditions (IF-THEN-ELSE) | No. | Yes. |
| Delays between actions | No. | Yes. |
| Background work | Yes. | Yes (autostart permit required) |
| Support for plugins | No. | Yes (for example, to work with Home Assistant) |
β οΈ Note: On Xiaomi with HyperOS for MacroDroid to work correctly, you need to manually add the application to the AutoRun list and Without battery restrictions (path: Settings: Settings β Annexes β Application management β MacroDroid β Permits).
π‘
If the trigger doesn't work, check if the system optimizes the background. β Battery β Optimize the battery and disable it for the application responsible for automation.
Geolocation Triggers: Location-Based Automation
Geolocation triggers are useful for automating actions based on your location, such as:
- π± Automatic Wi-Fi connection at home/work.
- π Switching to vibration in the office.
- π Starting the navigator (Google Maps or Yandex.Maps) when approaching the car.
How to configure a geo-trigger in the built-in application:
- Open Automation. β Add a rule β Location.
- Choose Entering the Zone or Exiting the Zone.
- Specify the address on the map (the radius of the zone can be adjusted from 100 to 2000 meters).
- Add an action (e.g., Turn on Bluetooth when you enter the Machine area).
Important nuances:
- π For precise geolocation operation, enable High Accuracy in Location Settings (Settings) β Location β Regime. β High precision).
- π Geo triggers are using up the battery, so to reduce the consumption, increase the radius of the zone to 500.+ meters.
- π« In HyperOS, geolocation rules may not work in power saving mode. Turn off optimization for the Automation application.
Why does the geo-trigger work with a delay?
Triggers by device status: battery, network, sensors
This category of triggers responds to the internal parameters of the smartphone: charge level, network connection, state of sensors, etc. Letβs consider the most useful scenarios:
1. Battery charge management
You can set it up:
- π Automatic Power Saving Mode at Charge below 15%.
- π³ Sending. SMS Relative if the charge has dropped to 5% (requires MacroDroid).
- π Stop charging by 80% to keep the battery healthy (only works on devices with support for Adaptive Charging, for example, Xiaomi 13 Pro).
Example of configuration through built-in automation:
- Trigger: Battery charge β Less than 15%.
- Action: Energy saving regime β Turn on.
Reaction to device connection
Useful triggers:
- π§ Running Spotify or Yandex Music when connecting Bluetooth headphones.
- π Enabling Quick Charging when connected to the charger (MacroDroid required).
- π± Automatic synchronization of photos with Google Photos when connecting to home Wi-Fi.
On HyperOS devices, Bluetooth headphone triggers may not work due to system limitations.Solution: Use MacroDroid with Bluetooth Device Connected trigger and specify MAC-headphone.
3. Sensor triggers
Less obvious but useful scenarios:
- π‘οΈ Turning on the air conditioner via Mi Home if the temperature is above 25Β°C (requires a smart thermostat Xiaomi).
- π‘ Automatic flashlight activation when shaking your phone (configured via MacroDroid with Shake trigger).
- π± Switching to a dark topic after sunset (use the trigger Time of Day).
π‘
The triggers are the most reliable because they are independent of external factors (e.g. geolocation or networking) and they work instantly and do not consume the battery for background activity.
Voice triggers: control through Google Assistant and Alice
If you're more comfortable with your phone using your voice, you can configure triggers through virtual assistants. There are two options available on Xiaomi:
1. Google Assistant (for global firmware)
Examples of voice commands:
- π¦ Β«Okay, Google, turn on the flashlight for 3 minutesΒ».
- π΅ Β«Okay, Google, turn on flight modeΒ».
- π΅ Β«OK, Google, launch a playlist for training on SpotifyΒ».
How to set up:
- Make sure Google Assistant is activated (Long press home button" β Settings β Google Assistant).
- Open the Settings. β Google β Settings for Assistant β routines.
- Create a new routine by specifying voice commands and actions.
2.Alice (for Russian firmware)
Examples of teams for Alice:
- π Β«Alice, turn on the power savingΒ».
- π Β«Alice, remind me to buy milk when I'm near the supermarketΒ»).
- π§ Β«Alice, play music through Bluetooth headphonesΒ».
Limitations of voice triggers:
- π£οΈ It only works when the screen is unlocked (for security reasons).
- πΆ Requires Internet connection.
- π They can accidentally use similar phrases.
π‘
To make voice commands work faster, add Google Assistant or Alice to the list of apps without battery limitations (Settings) β Battery β Optimizing the battery).
Hidden Opportunities: Triggers for Advanced Users
If Xiaomiβs built-in tools arenβt enough, you can use them. ADB-So let's look at some examples of a team or a Tasker to create unique scenarios:
1. Automatic onset 5G when launching a specific application
If you want to have a mobile network 5G was only included for streaming (for example, on YouTube or TikTok), follow:
- Install Tasker and AutoInput plugin.
- Create a profile with the condition Application is launched β YouTube.
- Add in the action. ADB Command β shell settings put global preferred_network_mode 13 (where 13 β regime 5G SA/NSA).
- Add the task at the exit of the application: shell settings put global preferred_network_mode 9 (regime LTE/4G).
Scheduled blocking of applications
To limit access to social media during working hours:
- In MacroDroid, Create a Rule with Time Trigger β 09:00β18:00.
- Add the action Blocking applications β Select apps (e.g. Instagram, TikTok).
- Set a password to unlock (optional).
3. Automatic change of wallpaper by time of day
Use Tasker with the AutoWallpaper plugin:
- Create a profile with two contexts: Time β 07:00-19:00 (day wallpaper). β 19:00β07:00 (night wallpaper).
AutoWallpaper β Set up wallpaper
To work with ADB-teams will need:
- Enable Debugging on USB (Settings β The phone. β Version. MIUI β 7 times press to activate the developer mode, then Settings β Additionally. β For developers β Debugging by USB).
- Connect your phone to your PC and execute the command: adb shell pm grant com.termux.api android.permission.WRITE_SECURE_SETTINGS (for applications like Termux, if you need permission to change system settings).
If geolocation is used, make sure High Precision Mode is enabled and the application is allowed to access the location.