Skip to content

Commit

Permalink
Change library from bluepy to Bleak (with async) (#32)
Browse files Browse the repository at this point in the history
* Update __init__.py

* Basic framework for bleak conversion.

* Update __init__.py

* Fix methods that return static data.

* Fixed last few functions.

* Ensure CaSe for discovery data, connect_lock for sensitive functions.

-No passive scan mode available so I removed references.

* Updated with latest changes on pyswitchbot

* Update messages to latest released version.

* Rework get device by type functions.

* Add missing model key.

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Restructure for non blocking async.

* Attempt to improve reliability on weak signal device.

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* A fix for a few dict keys being overwritten.

* Replace sleep with asyncio sleep.

* oops, forgot to await asyncio.sleep.

* Should probably keep the connect_lock on this function.

* Remove client.read_gatt_char, as notification is already in memory after writing.
  • Loading branch information
RenierM26 authored Jun 21, 2022
1 parent 7669fda commit dbc9d52
Show file tree
Hide file tree
Showing 2 changed files with 171 additions and 279 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
setup(
name = 'PySwitchbot',
packages = ['switchbot'],
install_requires=['bluepy'],
version = '0.13.3',
install_requires=['bleak'],
version = '0.14.0',
description = 'A library to communicate with Switchbot',
author='Daniel Hjelseth Hoyer',
url='https://github.com/Danielhiversen/pySwitchbot/',
Expand Down
Loading

0 comments on commit dbc9d52

Please sign in to comment.