Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Add check for scan_timeout in config (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwestenberg authored Jan 6, 2021
1 parent 53c93c5 commit 67ccc2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workers/lywsd03mmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def status_update(self):

if self.passive:
scanner = btle.Scanner()
results = scanner.scan(self.scan_timeout or 20.0, passive=True)
results = scanner.scan(self.scan_timeout if hasattr(self, 'scan_timeout') else 20.0, passive=True)

for res in results:
device = self.find_device(res.addr)
Expand Down

0 comments on commit 67ccc2b

Please sign in to comment.