Bluetooth#

class ignis.services.bluetooth.BluetoothService None#

A Bluetooth service. Requires gnome-bluetooth-3.0.

signal device_added#

Emitted when a Bluetooth device has been added.

Parameters:

device (BluetoothDevice) -- The instance of the Bluetooth device.

gproperty client: gi.repository.GnomeBluetooth.Client#
  • read-only

An instance of GnomeBluetooth.Client.

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

A list of all Bluetooth devices.

gproperty connected_devices: list[BluetoothDevice]#
  • read-only

A list of currently connected Bluetooth devices.

gproperty powered: bool#
  • read-write

Whether the default Bluetooth adapter is powered.

gproperty state: str#
  • read-only

The current state of the default Bluetooth adapter.

Adapter state:
  • absent

  • on

  • turning-on

  • turning-off

  • off

gproperty setup_mode: bool#
  • read-write

Whether the default Bluetooth adapter is in setup mode (discoverable, and discovering).

Set to True to start scanning devices.

class ignis.services.bluetooth.BluetoothDevice(client: gi.repository.GnomeBluetooth.Client, gdevice: gi.repository.GnomeBluetooth.Device) None#

A Bluetooth device.

signal removed#

Emitted when the device has been removed.

gproperty gdevice: gi.repository.GnomeBluetooth.Device#
  • read-only

The instance of GnomeBluetooth.Device for this device.

gproperty address: str#
  • read-only

The Bluetooth device address of the device.

gproperty alias: str#
  • read-only

The name alias for the device.

gproperty battery_level: int#
  • read-only

The current battery level of the device (if available).

gproperty battery_percentage: float#
  • read-only

The current battery percentage of the device (if available).

gproperty connectable: bool#
  • read-only

Whether it is possible to connect to the device.

gproperty connected: bool#
  • read-only

Whether the device is currently connected.

gproperty icon_name: str#
  • read-only

The current icon name of the device.

gproperty name: str#
  • read-only

The complete device name. It is better to use the alias property when displaying the device name.

gproperty paired: bool#
  • read-only

Whether the device is paired.

gproperty trusted: bool#
  • read-only

Whether the remote is seen as trusted.

gproperty device_type: str#
  • read-only

The type of the device, e.g., "mouse", "speakers".

For more device types, see GnomeBluetooth.Type.

async connect_to() None#

Connect to this device.

Return type:

None

async disconnect_from() None#

Disconnect from this device.

Return type:

None