Trigger: Power Connected/Disconnected
The Power Connected/Disconnected trigger fires when the device is connected to or disconnected from an external power source (charger). This allows you to automate actions based on the charging state of your device.
Options
Trigger Event
- Power Connected - Fires when the device is connected to a power source
- Power Disconnected - Fires when the device is disconnected from a power source
Connection Type (Power Connected only)
When selecting "Power Connected", you can choose which types of power connections will trigger the macro:
- Wired (Fast) - Standard AC charger or USB connection with fast charging capability
- Wireless - Wireless/Qi charging pad
- Wired (Slow) - USB connection with slower charging (typically from a computer USB port)
You must select at least one connection type. Multiple types can be selected.
Examples
Example 1: Enable sync and reduce brightness when charging
Triggers Power Connected: Wired + Wireless
Actions Enable Auto-Sync Set Screen Brightness: 30%
Example 2: Disable Wi-Fi when unplugged and battery is low
Triggers Power Disconnected
Actions Disable WiFi Set Screen Timeout: 15 seconds
Constraints Battery Level: Below 30%
Example 3: Night mode when wireless charging
Triggers Power Connected: Wireless
Actions Set Do Not Disturb: Alarms Only Set Screen Brightness: 10%
Constraints Time of Day: 10:00 PM - 7:00 AM
Notes
- The trigger monitors the ACTION_BATTERY_CHANGED broadcast to detect power connection changes
- By default, all connection types are enabled if not specifically configured
- The distinction between Wired (Fast) and Wired (Slow) is based on the charging type reported by the Android system (AC vs USB)
- Wireless charging detection requires a device that supports wireless charging
- The trigger fires immediately when the power state changes
- This trigger is useful for automating battery-saving measures or enabling features only when charging
See Also