Skip to content

Commit e01a57b

Browse files
authored
feat: port base scanner from ha (#2)
1 parent d5564e5 commit e01a57b

File tree

9 files changed

+1532
-53
lines changed

9 files changed

+1532
-53
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,11 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
python-version:
39-
- "3.8"
40-
- "3.9"
4139
- "3.10"
4240
- "3.11"
4341
- "3.12"
4442
os:
4543
- ubuntu-latest
46-
- windows-latest
4744
- macOS-latest
4845
runs-on: ${{ matrix.os }}
4946
steps:

poetry.lock

Lines changed: 1037 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ packages = [
2323
"Changelog" = "https://github.com/bluetooth-devices/habluetooth/blob/main/CHANGELOG.md"
2424

2525
[tool.poetry.dependencies]
26-
python = "^3.8"
26+
python = ">=3.10,<3.13"
27+
bleak = ">=0.21.1"
28+
bleak-retry-connector = ">=3.3.0"
29+
bluetooth-data-tools = ">=1.16.0"
30+
home-assistant-bluetooth = ">=1.10.4"
31+
bluetooth-adapters = ">=0.16.1"
2732

2833
[tool.poetry.group.dev.dependencies]
2934
pytest = "^7.0"

src/habluetooth/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
11
__version__ = "0.0.1"
2+
3+
from .base_scanner import BaseHaRemoteScanner, BaseHaScanner
4+
from .const import (
5+
CONNECTABLE_FALLBACK_MAXIMUM_STALE_ADVERTISEMENT_SECONDS,
6+
FALLBACK_MAXIMUM_STALE_ADVERTISEMENT_SECONDS,
7+
SCANNER_WATCHDOG_INTERVAL,
8+
SCANNER_WATCHDOG_TIMEOUT,
9+
)
10+
from .models import HaBluetoothConnector
11+
12+
__all__ = [
13+
"BaseHaScanner",
14+
"BaseHaRemoteScanner",
15+
"HaBluetoothConnector",
16+
"FALLBACK_MAXIMUM_STALE_ADVERTISEMENT_SECONDS",
17+
"CONNECTABLE_FALLBACK_MAXIMUM_STALE_ADVERTISEMENT_SECONDS",
18+
"SCANNER_WATCHDOG_TIMEOUT",
19+
"SCANNER_WATCHDOG_INTERVAL",
20+
]

0 commit comments

Comments
 (0)