Skip to content

Commit

Permalink
Don't use deprecated method register_detection_callback (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
koenvervloesem authored Jan 7, 2023
1 parent 62817d9 commit 695c47d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/python/ScanAndDecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ def detection_callback(device, advertisement_data):


async def main():
scanner = BleakScanner()
scanner.register_detection_callback(detection_callback)
scanner = BleakScanner(detection_callback=detection_callback)
await scanner.start()
await asyncio.sleep(5.0)
await scanner.stop()
Expand Down

0 comments on commit 695c47d

Please sign in to comment.