Difference between revisions of "Trigger: Battery Temperature"

 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
===<p><b>About</b></p>===
+
<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>
  
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
''' Options '''
This trigger will fire when an application becomes the foreground application (launched) or when it is no longer the foreground app (closed).</pre>
 
  
==<p><b>Supported configurations</b></p>==
+
* '''Increase/Decrease''' - Trigger fires when temperature reaches a specific threshold
 +
** '''Increases to''' - Fires when battery temperature rises to or above the specified value
 +
** '''Decreases to''' - Fires when battery temperature falls to or below the specified value
 +
* '''Any Change''' - Trigger fires whenever the battery temperature changes
  
=== Increase/Decrease ===
+
''' Configuration '''
  
* '''''Increase/Decrease'''''
+
When selecting "Increase/Decrease" mode, you can specify the threshold:
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
When the temperature level increases or decreases to a specific level.
 
</pre>
 
  
* '''''Any Change'''''
+
* Use the slider to set a temperature value in degrees Celsius (default is 30 degrees C)
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
* Alternatively, select a variable to dynamically determine the threshold temperature
When the temperature level makes any change, this means that it will be activated at every temperature change.
+
* Choose whether to trigger on increases or decreases
</pre>
+
 
 +
''' 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]]

Latest revision as of 21:43, 5 January 2026

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.

Options

  • Increase/Decrease - Trigger fires when temperature reaches a specific threshold
    • Increases to - Fires when battery temperature rises to or above the specified value
    • Decreases to - Fires when battery temperature falls to or below the specified value
  • Any Change - Trigger fires whenever the battery temperature changes

Configuration

When selecting "Increase/Decrease" mode, you can specify the threshold:

  • 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

Triggers

Battery Temperature >= 45 degrees C
Actions

Notification: Warning - Battery temperature high!
Disable Wi-Fi
Set Screen Brightness: 10%

Example 2: Log Temperature Changes

Triggers

Battery Temperature (Any Change)
Actions

Write to File: Battery temp: [battery_temp] at [date_time]

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