Skip to content

Commit

Permalink
docs: update adapter use from README (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
terop authored Aug 1, 2024
1 parent c481235 commit b2b826f
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,14 @@ Enable Bluez with the `RUUVI_BLE_ADAPTER` environment variable.
$ export RUUVI_BLE_ADAPTER="bluez"
```

Or use `os.environ`. __NOTE:__ this must be set before importing `ruuvitag_sensor`.

```py
import os

os.environ["RUUVI_BLE_ADAPTER"] = "bluez"
```

And install ptyprocess.

```sh
Expand All @@ -445,21 +453,7 @@ In case of errors, the application tries to exit immediately, so it can be autom
### Bleak

Bleak is automatically installed with `ruuvitag-sensor` package on all platforms.
On Windows and macOS it is automatically used with `ruuvitag-sensor` package.

To enable Bleak use the `RUUVI_BLE_ADAPTER` environment variable as shown below.

```sh
$ export RUUVI_BLE_ADAPTER="bleak"
```

Or use `os.environ`. __NOTE:__ this must be set before importing `ruuvitag_sensor`.

```py
import os

os.environ["RUUVI_BLE_ADAPTER"] = "bleak"
```
It is automatically used with `ruuvitag-sensor` package on all platforms.

Bleak only supports asynchronous methods.

Expand Down

0 comments on commit b2b826f

Please sign in to comment.