Skip to content

Battery Charge Sensor (battery)

Monitors battery charge level (macOS only).

Overview

  • Sensor Key: battery
  • Platform: macOS only
  • Cache TTL: 30 seconds

Usage

curl "http://server/index.php?key=battery"

Output

85
100
1d 12h 35m
MacBook Pro

Values: Current charge, Maximum charge

Implementation

Uses system_profiler SPPowerDataType to extract battery information from XML output.

Platform Support

  • ✅ macOS - Full support
  • ❌ Linux - Not available
  • ❌ Windows - Not available
  • ❌ BusyBox - Not available