| Line 1: |
Line 1: |
| − | <pre class="header-style"> | + | <pre class="header-style">The Battery Saver State trigger fires when Android's battery saver mode is enabled or disabled. Battery saver is a system feature designed to minimize power usage by reducing background activity and visual effects when battery is low.</pre> |
| − | Battery saver is an option in Android designed to minimize power usage when enabled. It will typically only come on if the device is not plugged in or is less than the amount of battery % specified in the battery saver settings on your device (default is 20%). | |
| | | | |
| − | This trigger will fire when the battery saver is enabled/disabled depending on the configuration option chosen.
| + | ''' Options ''' |
| − | </pre>
| |
| − | <br/>
| |
| − | '''Example Usage'''<br/> | |
| − | When the battery saver is enabled, lower the brightness and disable Bluetooth and Mobile data.
| |
| − | <pre class="trigger-style">
| |
| − | Triggers
| |
| | | | |
| − | Battery saver state (Enabled)
| + | * '''Enabled''' - Trigger fires when battery saver mode is turned on |
| − | </pre>
| + | * '''Disabled''' - Trigger fires when battery saver mode is turned off |
| − | <pre class="action-style">
| |
| − | Actions
| |
| | | | |
| − | Brightness 15% | + | ''' Examples ''' |
| − | Disable bluetooth | + | |
| − | Disable mobile data | + | ''Example 1: Additional Power Saving When Battery Saver Activates'' |
| − | </pre> | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Battery Saver State (Enabled)</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Set Screen Brightness: 15% |
| | + | Disable Bluetooth |
| | + | Disable Mobile Data</pre> |
| | + | |
| | + | ''Example 2: Restore Settings When Battery Saver Disabled'' |
| | + | <pre class="trigger-style">Triggers |
| | + | |
| | + | Battery Saver State (Disabled)</pre> |
| | + | <pre class="action-style">Actions |
| | + | |
| | + | Set Screen Brightness: Auto |
| | + | Enable Bluetooth |
| | + | Enable Sync</pre> |
| | + | |
| | + | ''' Notes ''' |
| | + | |
| | + | * The trigger listens for the system broadcast ACTION_POWER_SAVE_MODE_CHANGED |
| | + | * Battery saver typically activates automatically when the device is unplugged and battery drops below a threshold (default is 20%) |
| | + | * Only one option can be selected per trigger instance - create separate triggers if you need to respond to both enabling and disabling |
| | + | * This trigger works with the standard Android battery saver implementation and may not respond to custom battery saving modes on some manufacturer devices (such as Xiaomi) |
| | + | |
| | + | ''' See Also ''' |
| | + | |
| | + | * [[Action:_Battery_Saver|Battery Saver Action]] |
| | + | * [[Constraint:_Battery_Saver_State|Battery Saver State Constraint]] |
| | + | * [[Trigger:_Battery_Level|Battery Level Trigger]] |