Module homey.ble_advertisement

Classes

class BleAdvertisement

A BLE advertisement for a peripheral.

This class must not be initialized by the developer, but retrieved by calling ManagerBLE.discover() or ManagerBLE.find().

Ancestors

Instance variables

var id : Final[str]

The ID of the peripheral assigned by Homey.

var uuid : Final[str]

The UUID of the peripheral.

var local_name : str

The local name advertised by the peripheral.

var address : Final[str]

The MAC address of the peripheral.

var address_type : Final[Literal['random', 'public']]

The type of address used by the peripheral.

var connectable : Final[bool]

Whether the peripheral allows connections.

var manufacturer_data : Final[bytes]

Manufacturer specific data for the peripheral.

var service_data : Final[tuple[ServiceData, ...]]

Data of the services advertised by the peripheral.

var service_uuids : Final[tuple[str, ...]]

UUIDs of the services advertised by the peripheral.

var rssi : Final[int]

Received signal strength indicator of the peripheral.

var timestamp : Final[int]

Unix epoch timestamp of when this advertisement was discovered, in ms.

Methods

async def connect(self) ‑> BlePeripheral

Connect to the peripheral referenced by this advertisement.

Raises

NotConnected
Raised if the peripheral is not connectable.

Inherited members

class ServiceData

ServiceData(uuid, data)

Ancestors

  • builtins.tuple

Instance variables

var uuid : LiteralString

The UUID of the service.

var data : bytes