Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unknown command + update to poetry #18

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tool.poetry]
name = "switchbotpy"
version = "0.1.9"
description = "An API for Switchbots that allows to control actions, settings and timers (also password protected)"
authors = ["Nicolas Küchler <nico.kuechler@protonmail.com>"]
readme = "README.md"
license = "MIT"
keywords = ["Switchbot", "Ble", "Button", "Actions", "Settings", "Timers"]
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
]

[tool.poetry.dependencies]
python = "^3.6"
pygatt = "^4.0.5"
pexpect = "^4.8.0"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

29 changes: 0 additions & 29 deletions setup.py

This file was deleted.

3 changes: 3 additions & 0 deletions switchbotpy/switchbot_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def handle_notification(handle: int, value: bytes):
class ActionStatus(Enum):
complete = 1
device_busy = 3
cmd_not_supported = 5
device_unreachable = 11
device_encrypted = 7
device_unencrypted = 8
Expand All @@ -26,6 +27,8 @@ def msg(self):
msg = "action complete"
elif self == ActionStatus.device_busy:
msg = "switchbot is busy"
elif self == ActionStatus.cmd_not_supported:
msg = "Device does not support this Command"
elif self == ActionStatus.device_unreachable:
msg = "switchbot is unreachable"
elif self == ActionStatus.device_encrypted:
Expand Down