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 object_path: str#
  • read-only

The D-Bus object path of the device.

property proxy: DBusProxy#
  • read-only

The instance of DBusProxy for this device.

property native_path: str#
  • read-only

The native path of the device.

property kind: str#
  • read-only

The device kind, e.g. battery.

property available: bool#
  • read-only

Whether the device is available.

property percent: float#
  • read-only

The current percentage of the device.

property charging: bool#
  • read-only

Whether the device is currently charging.

property charged: bool#
  • read-only

Whether the device is charged.

property icon_name: str#
  • read-only

The current icon name.

property time_remaining: int#
  • read-only

The time in seconds until fully charged (when charging) or until fully drains (when discharging).

property energy: float#
  • read-only

The energy left in the device. Measured in mWh.

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.

property energy_rate: float#
  • read-only

The rate of discharge or charge. Measured in mW.

property charge_cycles: int#
  • read-only

The number of charge cycles for the device, or -1 if unknown or non-applicable.

property vendor: str#
  • read-only

The vendor of the device.

property model: str#
  • read-only

The model of the device.

property serial: str#
  • read-only

The serial number of the device.

property power_supply: bool#
  • read-only

Whether the device is powering the system.

property technology: str#
  • read-only

The device technology e.g. lithium-ion.

property temperature: float#
  • read-only

The temperature of the device in degrees Celsius.

property voltage: float#
  • read-only

The current voltage of the device.