Difference between revisions of "Trigger: Battery Temperature"
| Line 1: | Line 1: | ||
| − | <pre class="header-style> | + | <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> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ''' Options ''' | |
| − | |||
| − | |||
| − | |||
| − | Log | + | * '''Increase/Decrease''' - Trigger fires when temperature reaches a specific threshold |
| − | </pre> | + | ** '''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'' | ||
| + | <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