Changes

no edit summary
Line 1: Line 1: −
<pre style="color: black">
+
<pre class="header-style">The Battery Temperature trigger fires when the battery temperature increases or decreases to a specified level, or on any temperature change. This is useful for monitoring device thermals and taking protective actions when the device gets too hot or cold.</pre>
This trigger fires when the battery temperature changes (increment to, decrease to or any change)
  −
</pre>
     −
'''Example Usage'''<br/>
+
''' Options '''
Battery temperature increase to 45º > decrease screen brightness and activate airplane mode.
+
 
<pre style="color: Red">
+
* '''Increase/Decrease''' - Trigger fires when temperature reaches a specific threshold
Battery >= 113°F
+
** '''Increases to''' - Fires when battery temperature rises to or above the specified value
</pre>
+
** '''Decreases to''' - Fires when battery temperature falls to or below the specified value
<pre style="color: #3498DB">
+
* '''Any Change''' - Trigger fires whenever the battery temperature changes
Brightness 15%
+
 
Disable bluetooth
+
''' Configuration '''
Disable mobile data
+
 
</pre>
+
When selecting "Increase/Decrease" mode, you can specify the threshold:
<pre style="color: Green">
+
 
</pre>
+
* Use the slider to set a temperature value in degrees Celsius (default is 30 degrees C)
 +
* Alternatively, select a variable to dynamically determine the threshold temperature
 +
* Choose whether to trigger on increases or decreases
 +
 
 +
''' Variable Support '''
 +
 
 +
You can use an integer variable to specify the temperature threshold instead of a fixed value. This allows for dynamic thresholds that can be changed at runtime.
 +
 
 +
''' Examples '''
 +
 
 +
''Example 1: Overheat Protection''
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Battery Temperature >= 45 degrees C</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Notification: Warning - Battery temperature high!
 +
Disable Wi-Fi
 +
Set Screen Brightness: 10%</pre>
 +
 
 +
''Example 2: Log Temperature Changes''
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Battery Temperature (Any Change)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Write to File: Battery temp: [battery_temp] at [date_time]</pre>
 +
 
 +
''' Notes '''
 +
 
 +
* The trigger listens for the system broadcast ACTION_BATTERY_CHANGED to monitor temperature
 +
* Temperature is measured in degrees Celsius
 +
* The trigger only fires once when the temperature transitions to the new state (for increase/decrease mode), not on every subsequent change where the condition remains true
 +
* The "Any Change" option is useful for logging or monitoring temperature patterns over time
 +
* Not all devices report precise temperature readings - some may report in larger increments
 +
 
 +
''' See Also '''
 +
 
 +
* [[Constraint:_Battery_Temperature|Battery Temperature Constraint]]
 +
* [[Trigger:_Battery_Level|Battery Level Trigger]]