Skip to content
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 <[email protected]>"]
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