Difference between revisions of "Constraint: Screen On/Off"

 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
<pre class="header-style">This constraint allows or prevents a macro/feature from running based on whether the screen is on or off.</pre>
This constraint can be used to allow a trigger to fire only when the device's screen is on/ off.
+
 
</pre>
+
''' Options '''
 +
 
 +
* '''Screen On''': Constraint passes only when the screen is on
 +
* '''Screen Off''': Constraint passes only when the screen is off
 +
 
 +
''' Example '''
 +
 
 +
''Example 1: Speak the time only when the screen is on''
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Day/Time Trigger - 12:00</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Speak Text: "It is noon"</pre>
 +
  <pre class="constraint-style">Constraints
 +
 
 +
Screen On/Off - Screen On</pre>
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger: Screen On/Off|Screen On/Off Trigger]]

Latest revision as of 13:48, 9 January 2026

This constraint allows or prevents a macro/feature from running based on whether the screen is on or off.

Options

  • Screen On: Constraint passes only when the screen is on
  • Screen Off: Constraint passes only when the screen is off

Example

Example 1: Speak the time only when the screen is on

Triggers

Day/Time Trigger - 12:00
Actions

Speak Text: "It is noon"
Constraints

Screen On/Off - Screen On

See Also