Difference between revisions of "Constraints"
Line 20: | Line 20: | ||
== List of Constraints == | == List of Constraints == | ||
− | [[Airplane Mode]] | + | [[Constraint: Airplane Mode|Airplane Mode]] |
− | [[AND / OR / NOT]] | + | [[Constraint: AND / OR / NOT|AND / OR / NOT]] |
[[Constraint: Application Running|Application Running]] | [[Constraint: Application Running|Application Running]] | ||
− | [[Auto Rotate]] | + | [[Constraint: Auto Rotate|Auto Rotate]] |
− | [[Auto Sync]] | + | [[Constraint: Auto Sync|Auto Sync]] |
− | [[Battery Level]] | + | [[Constraint: Battery Level|Battery Level]] |
− | [[Battery Saver State]] | + | [[Constraint: Battery Saver State|Battery Saver State]] |
− | [[Battery Temperature]] | + | [[Constraint: Battery Temperature|Battery Temperature]] |
− | [[Bluetooth State]] | + | [[Constraint: Bluetooth State|Bluetooth State]] |
− | [[Brightness]] | + | [[Constraint: Brightness|Brightness]] |
− | [[Calendar Entry]] | + | [[Constraint: Calendar Entry|Calendar Entry]] |
− | [[Call State]] | + | [[Constraint: Call State|Call State]] |
− | [[Cell Towers]] | + | [[Constraint: Cell Towers|Cell Towers]] |
− | [[Dark Mode]] | + | [[Constraint: Dark Mode|Dark Mode]] |
− | [[Day of the Month]] | + | [[Constraint: Day of the Month|Day of the Month]] |
− | [[Day of the Week]] | + | [[Constraint: Day of the Week|Day of the Week]] |
− | [[Device Facing]] | + | [[Constraint: Device Facing|Device Facing]] |
− | [[Device Locked/Unlocked]] | + | [[Constraint: Device Locked/Unlocked|Device Locked/Unlocked]] |
− | [[Device Orientation]] | + | [[Constraint: Device Orientation|Device Orientation]] |
− | [[GPS State]] | + | [[Constraint: GPS State|GPS State]] |
− | [[Headphone Connection]] | + | [[Constraint: Headphone Connection|Headphone Connection]] |
− | [[Is Roaming]] | + | [[Constraint: Is Roaming|Is Roaming]] |
− | [[Light Sensor]] | + | [[Constraint: Light Sensor|Light Sensor]] |
− | [[Location Mode]] | + | [[Constraint: Location Mode|Location Mode]] |
− | [[Macro(s) Enabled/Disabled]] | + | [[Constraint: Macro(s) Enabled/Disabled|Macro(s) Enabled/Disabled]] |
− | [[Macro(s) Invoked/Not invoked Recently]] | + | [[Constraint: Macro(s) Invoked/Not invoked Recently|Macro(s) Invoked/Not invoked Recently]] |
− | [[MacroDroid Mode]] | + | [[Constraint: MacroDroid Mode|MacroDroid Mode]] |
− | [[MacroDroid Variable]] | + | [[Constraint: MacroDroid Variable|MacroDroid Variable]] |
− | [[Mobile Data On/Off]] | + | [[Constraint: Mobile Data On/Off|Mobile Data On/Off]] |
− | [[Mobile Service Status]] | + | [[Constraint: Mobile Service Status|Mobile Service Status]] |
− | [[Month of the Year]] | + | [[Constraint: Month of the Year|Month of the Year]] |
− | [[Music Active]] | + | [[Constraint: Music Active|Music Active]] |
− | [[NFC State]] | + | [[Constraint: NFC State|NFC State]] |
− | [[Notification Present]] | + | [[Constraint: Notification Present|Notification Present]] |
− | [[Notification Volume]] | + | [[Constraint: Notification Volume|Notification Volume]] |
− | [[Phone Ringing]] | + | [[Constraint: Phone Ringing|Phone Ringing]] |
− | [[Power Connected]] | + | [[Constraint: Power Connected|Power Connected]] |
− | [[Priority Mode / Do Not Disturb]] | + | [[Constraint: Priority Mode / Do Not Disturb|Priority Mode / Do Not Disturb]] |
− | [[Proximity Sensor]] | + | [[Constraint: Proximity Sensor|Proximity Sensor]] |
− | [[Ringer Volume]] | + | [[Constraint: Ringer Volume|Ringer Volume]] |
− | [[Roaming Enabled]] | + | [[Constraint: Roaming Enabled|Roaming Enabled]] |
− | [[Rooted Device]] | + | [[Constraint: Rooted Device|Rooted Device]] |
− | [[Screen On/Off]] | + | [[Constraint: Screen On/Off|Screen On/Off]] |
− | [[Speakerphone On/Off]] | + | [[Constraint: Speakerphone On/Off|Speakerphone On/Off]] |
− | [[Stopwatch]] | + | [[Constraint: Stopwatch|Stopwatch]] |
− | [[Sunrise/Sunset]] | + | [[Constraint: Sunrise/Sunset|Sunrise/Sunset]] |
− | [[Time of Day]] | + | [[Constraint: Time of Day|Time of Day]] |
− | [[Time Since Boot]] | + | [[Constraint: Time Since Boot|Time Since Boot]] |
− | [[Torch On/Off]] | + | [[Constraint: Torch On/Off|Torch On/Off]] |
− | [[Trigger Fired]] | + | [[Constraint: Trigger Fired|Trigger Fired]] |
− | [[Volume Level]] | + | [[Constraint: Volume Level|Volume Level]] |
− | [[VPN State]] | + | [[Constraint: VPN State|VPN State]] |
− | [[Wifi HotSpot State]] | + | [[Constraint: Wifi HotSpot State|Wifi HotSpot State]] |
− | [[Wifi State]] | + | [[Constraint: Wifi State|Wifi State]] |
Revision as of 08:15, 5 February 2021
Constraints are optional and can be used to allow or prevent a macro/action from running based on certain conditions.
Constraints can be placed on macros to allow or prevent the entire macro firing based on the set condition(s). You can also add constraints directly to individual triggers and actions from the 'Edit Macro' screen, by clicking on the trigger/action and selecting "Add constraint"
A constraint is evaluated at the point a trigger fires or actions runs and a macro/action will only run if the constraint condition is true.
By default if adding more than one constraint to a macro they will be combined with an AND condition (e.g. all added constraints must be true). This can be changed in the dropdown in the constraints title to an OR condition. In this case only one of the added constraints needs to be true for the macro to run.
Nesting constraints
If you need more sophisticated logic applied to constraint there is a special AND/OR/XOR/NOT constraint that can be used. Any constraints nested under the logic constraint will have that logic operator applied. It's also possible to nest multiple logic constraints to create complex logic. For example:
AND | - Constraint 1 | - OR | - Constraint 2 | - Constraint 3
List of Constraints
Macro(s) Invoked/Not invoked Recently