hub.battery
The hub’s own battery: how full it is and whether it is charging.
Values update about every 2 seconds.
Attributes
plugged in and charging. |
|
plugged in and the battery is full. |
|
running on battery, no charger plugged in. |
|
not known yet. |
Functions
|
|
|
|
|
How full the battery is, from 0 to 100 %. |
|
What the battery is doing: |
|
Battery voltage in millivolts (1000 mV = 1 V). |
Module Contents
- hub.battery.fully_charged() bool[source]
Truewhen a charger is plugged in and the battery is full.
- hub.battery.state() int[source]
What the battery is doing:
UNKNOWN,ON_BATTERY,CHARGINGorFULLY_CHARGED.