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

Line 1: Line 1:
<span style="color: #0E9549; font-size: 24px;">'''About this constraint '''</span>
+
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.
+
''' 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]]

Revision as of 13:48, 9 January 2026

pre class="header-style">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