device

device.device.battery_state

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