device.device.battery_state
Declaration
lua
device.battery_state()
Description
Get battery charging state.
Parameters
No parameters
Return Values
| Type | Description |
|---|---|
| string | One of: "Unknown", "Unplugged", "Charging", "Full" |
Example
lua
sys.log(device.battery_state())