ManagerBLE
homey.manager.ble
Manages Bluetooth Low Energy communication.
You can access this manager through the Homey instance as self.homey.ble.
Ancestors
- Manager
- SimpleClass
- homey.util.event_emitter.EventEmitter
- typing.Generic
- abc.ABC
Methods
discover
async def discover(self, service_filter: list[str] | None = None) ‑> tuple[BleAdvertisement, ...]Discover BLE peripherals for a certain time.
Requires the homey:wireless:ble permission.
For more information about permissions read the Permissions tutorial.
Args
| Name | Type | Description |
|---|---|---|
service_filter |
list[str] | None | A collection of service UUIDs the peripheral should expose. |
Returns
A tuple of BLE advertisements, filtered by the service filter if given.
find
async def find(self, peripheral_uuid: str) ‑> BleAdvertisementFind a BLE peripheral with the given UUID.
Requires the homey:wireless:ble permission.
For more information about permissions read the Permissions tutorial.
Args
peripheral_uuid:
Returns
The BLE advertisement of the peripheral.
Raises
NotFound- Raised if no peripheral with the given UUID is found.