| name | estimation |
| description | Computes estimated time to full charge or depletion from recent battery trends. Use when implementing battery time remaining estimation and fallback rules for noisy or missing data. |
Estimation Skill
Goal
Estimate remaining minutes to full charge or empty battery.
Method
- Build slope from recent history (
deltaPercent / deltaMinutes).
- Ignore windows that are too short or nearly flat.
- For charging: estimate minutes to 100%.
- For discharging: estimate minutes to 0%.
- Clamp unrealistic outputs and return
nil on low confidence.
Fallback
- Prefer system-provided remaining time if available and valid.
- Otherwise, use trend estimate.