Skip to content

Commit

Permalink
📦 feat: Optional simplepyble dependency
Browse files Browse the repository at this point in the history
Bluetooth support is disabled by default and can be enabled with:
```sh
pip install edilkamin[ble]
```
  • Loading branch information
AndreMiras committed Nov 30, 2022
1 parent 7c27564 commit aea09fd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Mind offers an app/API to remote control the Edilkamin pellet stoves.
## Install

```sh
pip install edilkamin
pip install edilkamin[ble]
```

## Usage
Expand Down
3 changes: 2 additions & 1 deletion edilkamin/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from enum import Enum

import requests
import simplepyble
from pycognito import Cognito

from edilkamin import constants
Expand Down Expand Up @@ -66,6 +65,8 @@ def discover_devices(convert=True) -> typing.Tuple[str]:
Return the MAC addresses of the discovered devices.
Return the addresses converted to device wifi/identifier instead of the BLE ones.
"""
import simplepyble

devices = ()
adapters = simplepyble.Adapter.get_adapters()
for adapter in adapters:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-e .[dev]
-e .[dev,ble]
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def read(fname):
"install_requires": [
"pycognito",
"requests",
"simplepyble",
],
"extras_require": {
"ble": ["simplepyble"],
"dev": [
"black",
"coveralls",
Expand All @@ -50,7 +50,7 @@ def read(fname):
"tox",
"twine",
"wheel",
]
],
},
}

Expand Down

0 comments on commit aea09fd

Please sign in to comment.