Skip to content

Commit

Permalink
v0.2.23: scanner ignore non ftms devices
Browse files Browse the repository at this point in the history
  • Loading branch information
dudanov committed Aug 10, 2024
1 parent 96c0102 commit eca1c77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyftms/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
UpdateEventData,
)
from .client import DisconnectCallback, FitnessMachine
from .const import FITNESS_MACHINE_SERVICE_UUID
from .machines import get_machine
from .manager import PropertiesManager
from .properties import (
Expand Down Expand Up @@ -103,9 +102,7 @@ async def get_client_from_address(
if dev.address.lower() != address.lower():
continue

data = adv.service_data.get(FITNESS_MACHINE_SERVICE_UUID)

if data is not None and len(data) == 3:
try:
return get_client(
dev,
adv,
Expand All @@ -114,6 +111,9 @@ async def get_client_from_address(
on_disconnect=on_disconnect,
)

except NotFitnessMachineError:
pass

except asyncio.TimeoutError:
pass

Expand Down

0 comments on commit eca1c77

Please sign in to comment.