Skip to content

Commit

Permalink
update bleak interface
Browse files Browse the repository at this point in the history
  • Loading branch information
superfashi committed Sep 13, 2022
1 parent 2f11b4e commit b065b19
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
author = 'Hanbang Wang'

# The short X.Y version
version = '0.10'
version = '0.11.1'
# The full version, including alpha/beta/rc tags
release = '0.10'
release = '0.11.1'

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='spherov2',
version='0.11',
version='0.11.1',
author='Hanbang Wang', # and 'Elionardo Feliciano',
author_email='[email protected]', # and '[email protected]',
license='MIT',
Expand Down
2 changes: 1 addition & 1 deletion spherov2/adapter/bleak_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class BleakAdapter:
@staticmethod
def scan_toys(timeout: float = 5.0):
return asyncio.run(bleak.discover(timeout))
return asyncio.run(bleak.BleakScanner.discover(timeout))

def __init__(self, address):
self.__event_loop = asyncio.new_event_loop()
Expand Down
2 changes: 2 additions & 0 deletions spherov2/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def find_toys(*, timeout=5.0, toy_types: List[Type[Toy]] = None,
if toy_names is not None:
toy_names = set(toy_names)
for toy in toys:
if toy.name is None:
continue
if toy_names is not None and toy.name not in toy_names:
continue
for toy_cls in toy_types:
Expand Down

0 comments on commit b065b19

Please sign in to comment.