Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

None Type in Device Name Fix #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion triones.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async def discover():
"""Discover Bluetooth LE devices."""
devices = await BleakScanner.discover()
LOGGER.debug("Discovered devices: %s", [{"address": device.address, "name": device.name} for device in devices])
return [device for device in devices if device.name.lower().startswith("triones") or device.name.lower().startswith("ledble")]
return [device for device in devices if device.name is not None and (device.name.lower().startswith("triones") or device.name.lower().startswith("ledble"))]

def create_status_callback(future: asyncio.Future):
def callback(sender: int, data: bytearray):
Expand Down