-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support for breez and pro devices (#14)
* test: improve coverage * test: update pyproject.toml for tests * test: add device properties for testing * test: add coverage for mock clients * test: mock client handles disconnect properly * test: states are copied in mock clients * docs: add supported devices, update usage --------- Co-authored-by: github-actions <github-actions@github.com>
- Loading branch information
1 parent
e95d3db
commit 3b823c8
Showing
22 changed files
with
3,587 additions
and
1,762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,94 @@ | ||
[tool.poetry] | ||
name = "pysnooz" | ||
version = "0.8.6" | ||
description = "Control SNOOZ white noise machines." | ||
authors = ["Austin Brunkhorst <pysnooz@alb.dev>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
repository = "https://github.com/AustinBrunkhorst/pysnooz" | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent", | ||
"Topic :: Software Development :: Libraries", | ||
] | ||
packages = [{ include = "pysnooz", from = "src" }] | ||
|
||
[tool.poetry.urls] | ||
"Bug Tracker" = "https://github.com/AustinBrunkhorst/pysnooz/issues" | ||
"Changelog" = "https://github.com/AustinBrunkhorst/pysnooz/blob/main/CHANGELOG.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
home-assistant-bluetooth = ">=1.3.0" | ||
bluetooth-sensor-state-data = ">=1.5.0" | ||
bleak-retry-connector = ">=3.0.2" | ||
bleak = ">=0.20.2" | ||
Events = "^0.4" | ||
transitions = "^0.8.11" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pytest = "^7.0" | ||
pytest-cov = "^4.0" | ||
pytest-asyncio = "^0.19.0" | ||
freezegun = "^1.2.2" | ||
pytest-mock = "^3.8.2" | ||
pandas = "^1.4.3" | ||
autopep8 = "^1.7.0" | ||
flake8 = "^5.0.4" | ||
|
||
[tool.semantic_release] | ||
branch = "main" | ||
version_toml = ["pyproject.toml:tool.poetry.version"] | ||
version_variables = ["src/pysnooz/__init__.py:__version__"] | ||
build_command = "pip install poetry && poetry build" | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "-v -Wdefault --cov=pysnooz --cov-report=term-missing:skip-covered" | ||
pythonpath = ["src"] | ||
log_cli = true | ||
log_cli_level = "DEBUG" | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"pragma: no cover", | ||
"@overload", | ||
"if TYPE_CHECKING", | ||
"raise NotImplementedError", | ||
] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
known_first_party = ["pysnooz", "tests"] | ||
|
||
[tool.mypy] | ||
check_untyped_defs = true | ||
disallow_any_generics = true | ||
disallow_incomplete_defs = true | ||
disallow_untyped_defs = true | ||
mypy_path = "src/" | ||
no_implicit_optional = true | ||
show_error_codes = true | ||
warn_unreachable = true | ||
warn_unused_ignores = true | ||
exclude = ['setup.py'] | ||
|
||
[[tool.mypy.overrides]] | ||
module = "tests.*" | ||
allow_untyped_defs = true | ||
|
||
[[tool.mypy.overrides]] | ||
module = "freezegun.*" | ||
ignore_missing_imports = true | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
[tool.poetry] | ||
name = "pysnooz" | ||
version = "0.8.6" | ||
description = "Control SNOOZ white noise machines." | ||
authors = ["Austin Brunkhorst <pysnooz@alb.dev>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
repository = "https://github.com/AustinBrunkhorst/pysnooz" | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent", | ||
"Topic :: Software Development :: Libraries", | ||
] | ||
packages = [{ include = "pysnooz", from = "src" }] | ||
|
||
[tool.poetry.urls] | ||
"Bug Tracker" = "https://github.com/AustinBrunkhorst/pysnooz/issues" | ||
"Changelog" = "https://github.com/AustinBrunkhorst/pysnooz/blob/main/CHANGELOG.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
home-assistant-bluetooth = ">=1.3.0" | ||
bluetooth-sensor-state-data = ">=1.5.0" | ||
bleak-retry-connector = ">=3.0.2" | ||
bleak = ">=0.20.2" | ||
Events = "^0.4" | ||
transitions = "^0.8.11" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pytest = "^7.0" | ||
pytest-cov = "^4.0" | ||
pytest-asyncio = "^0.19.0" | ||
freezegun = "^1.2.2" | ||
pytest-mock = "^3.8.2" | ||
pandas = "^1.4.3" | ||
autopep8 = "^1.7.0" | ||
flake8 = "^5.0.4" | ||
|
||
[tool.semantic_release] | ||
branch = "main" | ||
version_toml = ["pyproject.toml:tool.poetry.version"] | ||
version_variables = ["src/pysnooz/__init__.py:__version__"] | ||
build_command = "pip install poetry && poetry build" | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "-v -Wdefault --cov=pysnooz --cov-report=term-missing:skip-covered" | ||
pythonpath = ["src"] | ||
log_cli = true | ||
log_cli_level = "DEBUG" | ||
markers = [ | ||
"model", | ||
] | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"pragma: no cover", | ||
"@abstract", | ||
"@overload", | ||
"if TYPE_CHECKING", | ||
"raise NotImplementedError", | ||
] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
known_first_party = ["pysnooz", "tests"] | ||
|
||
[tool.mypy] | ||
check_untyped_defs = true | ||
disallow_any_generics = true | ||
disallow_incomplete_defs = true | ||
disallow_untyped_defs = true | ||
mypy_path = "src/" | ||
no_implicit_optional = true | ||
show_error_codes = true | ||
warn_unreachable = true | ||
warn_unused_ignores = true | ||
exclude = ['setup.py'] | ||
|
||
[[tool.mypy.overrides]] | ||
module = "tests.*" | ||
allow_untyped_defs = true | ||
|
||
[[tool.mypy.overrides]] | ||
module = "freezegun.*" | ||
ignore_missing_imports = true | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,52 @@ | ||
__version__ = "0.8.6" | ||
from .advertisement import ( | ||
SnoozAdvertisementData, | ||
get_device_display_name, | ||
parse_snooz_advertisement, | ||
) | ||
from .commands import ( | ||
SnoozCommandResult, | ||
SnoozCommandResultStatus, | ||
get_device_info, | ||
set_auto_temp_enabled, | ||
set_fan_speed, | ||
set_temp_target, | ||
set_volume, | ||
turn_fan_off, | ||
turn_fan_on, | ||
turn_off, | ||
turn_on, | ||
) | ||
from .device import SnoozCommandData, SnoozDevice | ||
from .model import ( | ||
SnoozDeviceCharacteristicData, | ||
SnoozDeviceModel, | ||
SnoozDeviceState, | ||
SnoozFirmwareVersion, | ||
UnknownSnoozState, | ||
) | ||
|
||
__version__ = "0.8.6" | ||
|
||
__all__ = [ | ||
"SnoozDeviceModel", | ||
"SnoozFirmwareVersion", | ||
"SnoozDevice", | ||
"SnoozDeviceState", | ||
"SnoozDeviceCharacteristicData", | ||
"UnknownSnoozState", | ||
"SnoozCommandData", | ||
"SnoozCommandResult", | ||
"SnoozCommandResultStatus", | ||
"SnoozAdvertisementData", | ||
"parse_snooz_advertisement", | ||
"get_device_display_name", | ||
"get_device_info", | ||
"turn_on", | ||
"turn_off", | ||
"set_volume", | ||
"turn_fan_on", | ||
"turn_fan_off", | ||
"set_fan_speed", | ||
"set_auto_temp_enabled", | ||
"set_temp_target", | ||
] |
Oops, something went wrong.