UPower#
- class ignis.services.upower.UPowerService None #
An UPower service. Requires
UPower
.- Raises:
UPowerNotRunningError -- If UPower D-Bus service is not running.
- device_added(*args)#
Signal
Emitted when a power device has been added.
- Parameters:
device (
UPowerDevice
) -- The instance of the UPower device.
- battery_added(*args)#
Signal
Emitted when a battery has been added.
- Parameters:
battery (
UPowerDevice
) -- The instance of the battery.
- property devices: list[UPowerDevice]#
read-only
A list of all power devices.
- property batteries: list[UPowerDevice]#
read-only
A list of batteries.
- property display_device: UPowerDevice#
read-only
The currently active device intended for display.
- class ignis.services.upower.UPowerDevice(object_path: str)#
The general class for power devices, including batteries.
- removed()#
Signal
Emitted when the device has been removed.
- property time_remaining: int#
read-only
The time in seconds until fully charged (when charging) or until fully drains (when discharging).
- property energy_full: float#
read-only
The amount of energy when the device is fully charged. Measured in mWh.
- property energy_full_design: float#
read-only
The amount of energy when the device was brand new. Measured in mWh.