switchbot-api 2.2.1__tar.gz → 2.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {switchbot_api-2.2.1 → switchbot_api-2.3.1}/PKG-INFO +3 -3
- {switchbot_api-2.2.1 → switchbot_api-2.3.1}/pyproject.toml +1 -1
- {switchbot_api-2.2.1 → switchbot_api-2.3.1}/switchbot_api/__init__.py +8 -1
- {switchbot_api-2.2.1 → switchbot_api-2.3.1}/LICENSE +0 -0
- {switchbot_api-2.2.1 → switchbot_api-2.3.1}/README.md +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: switchbot_api
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: An asynchronous library to use Switchbot API
|
|
5
|
-
Home-page: https://github.com/SeraphicCorp/py-switchbot-api
|
|
6
5
|
License: MIT
|
|
7
6
|
Author: Ravaka Razafimanantsoa
|
|
8
7
|
Author-email: contact@ravaka.dev
|
|
@@ -12,6 +11,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.10
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
15
|
Requires-Dist: aiohttp (>=3.8.4,<4.0.0)
|
|
16
16
|
Project-URL: Repository, https://github.com/SeraphicCorp/py-switchbot-api
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
@@ -172,6 +172,12 @@ class VacuumCommands(Commands):
|
|
|
172
172
|
POW_LEVEL = "PowLevel"
|
|
173
173
|
|
|
174
174
|
|
|
175
|
+
class BotCommands(Commands):
|
|
176
|
+
"""Bot commands."""
|
|
177
|
+
|
|
178
|
+
PRESS = "press"
|
|
179
|
+
|
|
180
|
+
|
|
175
181
|
T = TypeVar("T", bound=CommonCommands)
|
|
176
182
|
|
|
177
183
|
|
|
@@ -214,6 +220,7 @@ class SwitchBotAPI:
|
|
|
214
220
|
body = await response.json()
|
|
215
221
|
|
|
216
222
|
if response.status >= 400:
|
|
223
|
+
_LOGGER.error("Error %d: %s", response.status, body)
|
|
217
224
|
raise CannotConnect()
|
|
218
225
|
|
|
219
226
|
match body.get("statusCode"):
|
|
@@ -226,7 +233,7 @@ class SwitchBotAPI:
|
|
|
226
233
|
# online too.
|
|
227
234
|
raise DeviceOffline()
|
|
228
235
|
case _:
|
|
229
|
-
_LOGGER.error("Error %
|
|
236
|
+
_LOGGER.error("Error %d: %s", response.status, body)
|
|
230
237
|
raise CannotConnect()
|
|
231
238
|
|
|
232
239
|
async def list_devices(self) -> list[Device | Remote]:
|
|
File without changes
|
|
File without changes
|