BleAdvertisement

homey.ble_advertisement

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

  • SimpleClass
  • homey.util.event_emitter.EventEmitter
  • typing.Generic

Instance variables

id

var id : Final[str]

The ID of the peripheral assigned by Homey.

uuid

var uuid : Final[str]

The UUID of the peripheral.

local_name

var local_name : str

The local name advertised by the peripheral.

address

var address : Final[str]

The MAC address of the peripheral.

address_type

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

The type of address used by the peripheral.

connectable

var connectable : Final[bool]

Whether the peripheral allows connections.

manufacturer_data

var manufacturer_data : Final[bytes]

Manufacturer specific data for the peripheral.

service_data

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

Data of the services advertised by the peripheral.

service_uuids

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

UUIDs of the services advertised by the peripheral.

rssi

var rssi : Final[int]

Received signal strength indicator of the peripheral.

timestamp

var timestamp : Final[int]

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

Methods

connect

async def connect(self) ‑> BlePeripheral

Connect to the peripheral referenced by this advertisement.

Raises

NotConnected
Raised if the peripheral is not connectable.

Inherited members

ServiceData

class ServiceData

ServiceData(uuid, data)

Ancestors

  • builtins.tuple

Instance variables

uuid

var uuid : LiteralString

The UUID of the service.

data

var data : bytes