Documentation / LemmeKnow

Conditions

Conditions describe the state of your phone and its surroundings: the time, the Wi-Fi network, whether you're on a call, and so on. You use them in two places:

  • Quiet rules, which pause rules while their conditions are true.
  • The Trigger and Toggle modes of a rule, which fire when conditions change. See Notification rules.

Conditions are different from filter expressions, which look at the content of an incoming message.

Building a condition tree

Conditions sit in a tree. The top group, and any group you add, is either All (every condition must be true) or Any (at least one must be true). Tap Condition in a group's add row to open the picker, or + Add group to nest a group. Groups can nest as deep as you need, for example "after 10 PM and (on home Wi-Fi or battery below 20%)". An empty group is never true.

Each row reads like a sentence, such as Count is 3 to 10 unacknowledged or BT Device contains Pixel Buds. Tap any part of the row to edit it. Every condition dialog opens with a comparison of is or is not, so any condition can be reversed. Conditions with no settings (such as Charging or DND) show a TRUE/FALSE or ON/OFF switch instead.

Below the tree:

  • Copy and Paste move a whole condition tree between quiet rules and trigger rules.
  • Invert flips the whole tree: it swaps All and Any and reverses every top-level condition. Use it when it's easier to describe the opposite of what you want.

Condition reference

The picker groups conditions into categories.

Time & Schedule

ConditionSettingsTrue when
TimeStart and End timeThe current time is in the window. Ranges that cross midnight work.
DayOne or more days of the weekToday is one of the chosen days
CooldownMinutesThe rule last fired less than this many minutes ago. Never true before the rule has fired once.

Device

ConditionSettingsTrue when
BatteryBelow, Above, or Between, with a percentageThe battery is below the level, at or above it, or within the range
ChargingNoneThe phone is charging
UnlockNoneThe phone is unlocked
ScreenNoneThe screen is on
Power SaveNoneBattery saver is on
SwitchNoneYou've turned the switch on (quiet rules only, see below)

Network & Connectivity

ConditionSettingsTrue when
WiFiNetwork names, separated by commas; optional minimum signal bars (0.0 to 4.0)The phone is connected to one of the networks, with at least that signal if set
CellularNoneThe active connection is mobile data rather than Wi-Fi
BT DeviceDevice names, separated by commasOne of the named Bluetooth audio devices is connected

Use current network and Use connected device fill in what you're connected to right now.

Audio & Calls

ConditionSettingsTrue when
RingerNormal, Vibrate, Silent (one or more)The ringer is in one of the chosen modes
DNDNoneDo Not Disturb is on
HeadphonesNoneHeadphones are connected
CallIn call (active), Ringing (incoming)The phone is in one of the chosen call states
MediaNoneSomething is playing

App & Location

ConditionSettingsTrue when
AppOne or more apps; current app or runningOne of the apps is in the foreground (current app), or was used in the last 30 minutes (running)
AlertsAbove, Below, or Between, with countsThe rule's number of unacknowledged alerts is at or above the minimum, below it, or within the range (inclusive)
LocationLatitude, Longitude, Radius (meters), and moreThe phone is within the radius of the point

The App condition needs usage access. The Alerts count includes alerts held by a quiet rule.

Server state

Server State and State Field are Premium conditions that read the states a LemmeSee hub publishes through its plugins. A plain LemmeKnow Server publishes no states. See Connecting to a LemmeSee hub.

ConditionSettingsTrue when
Server StateServer (the rule's server or a specific one), state, comparison, optional previous stateThe state matches the comparison
State FieldServer, state, field name, comparison, value, optional previous valueThe named field of the state matches the comparison

Server State comparisons: in alarm, healthy, error (the state hasn't updated for twice its interval), equals, contains, starts with, and empty.

State Field comparisons: equals, not equals, contains, starts with, empty, is true, is false, above, below, at or above, at or below, between, and outside. Numeric comparisons need both the field and your value to be numbers; otherwise the condition is false. between includes both ends. is true accepts true, 1, or any nonzero number.

Setting a previous state or previous value makes the condition true only on a change: the last snapshot must have matched the previous comparison and the current one must match the main comparison.

Location settings

Tap Use current location or Pick on map to fill in the coordinates. The radius is in meters.

With Use geofencing (Play Services) turned on in Settings, Location uses Android's battery-efficient geofencing and adds Dwell time (minutes, 0 = on entry): the condition becomes true only after you've stayed inside the radius that long. Without geofencing, LemmeKnow checks your location directly and you can set Min interval (seconds) and Min distance (meters) between checks. Tighter values react faster but use more battery. Dwell time isn't available in this mode.

WiFi and Location need location permission. See Permissions.

The Switch condition

Switch is a manual on/off condition, available in quiet rules only. Flip it from the switch on the quiet rule's row on the Notifications tab, from a cell on the Switch Board home screen widget, or with the Set Switch action. It's a simple way to build "Vacation mode" or "Focus" quiet rules that you control by hand. See Widgets.

Tokens in conditions

Some condition text can include tokens, filled in each time the condition is checked: Wi-Fi network names, Bluetooth device names, and the state names and values you type into Server State and State Field.