UPower#

class ignis.services.upower.UPowerService None#

An UPower service. Requires UPower.

Raises:

UPowerNotRunningError -- If UPower D-Bus service is not running.

signal device_added#

Emitted when a power device has been added.

Parameters:

device (UPowerDevice) -- The instance of the UPower device.

signal battery_added#

Emitted when a battery has been added.

Parameters:

battery (UPowerDevice) -- The instance of the battery.

gproperty devices: list[UPowerDevice]#
  • read-only

A list of all power devices.

gproperty batteries: list[UPowerDevice]#
  • read-only

A list of batteries.

gproperty 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.

signal removed#

Emitted when the device has been removed.

gproperty object_path: str#
  • read-only

The D-Bus object path of the device.

gproperty proxy: DBusProxy#
  • read-only

The instance of DBusProxy for this device.

gproperty native_path: str#
  • read-only

The native path of the device.

gproperty kind: str#
  • read-only

The device kind, e.g. battery.

gproperty available: bool#
  • read-only

Whether the device is available.

gproperty percent: float#
  • read-only

The current percentage of the device.

gproperty charging: bool#
  • read-only

Whether the device is currently charging.

gproperty charged: bool#
  • read-only

Whether the device is charged.

gproperty icon_name: str#
  • read-only

The current icon name.

gproperty time_remaining: int#
  • read-only

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

gproperty energy: float#
  • read-only

The energy left in the device. Measured in mWh.

gproperty energy_full: float#
  • read-only

The amount of energy when the device is fully charged. Measured in mWh.

gproperty energy_full_design: float#
  • read-only

The amount of energy when the device was brand new. Measured in mWh.

gproperty energy_rate: float#
  • read-only

The rate of discharge or charge. Measured in mW.

gproperty charge_cycles: int#
  • read-only

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

gproperty vendor: str#
  • read-only

The vendor of the device.

gproperty model: str#
  • read-only

The model of the device.

gproperty serial: str#
  • read-only

The serial number of the device.

gproperty power_supply: bool#
  • read-only

Whether the device is powering the system.

gproperty technology: str#
  • read-only

The device technology e.g. lithium-ion.

gproperty temperature: float#
  • read-only

The temperature of the device in degrees Celsius.

gproperty voltage: float#
  • read-only

The current voltage of the device.