switchbot-api 2.2.0__py3-none-any.whl → 2.3.0__py3-none-any.whl

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/__init__.py CHANGED
@@ -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
 
@@ -285,7 +291,7 @@ class SwitchBotAPI:
285
291
  """
286
292
  json = {
287
293
  "commandType": command_type,
288
- "command": command if isinstance(command, Commands) else command,
294
+ "command": command.value if isinstance(command, Commands) else command,
289
295
  "parameter": parameters,
290
296
  }
291
297
  await self._request(f"devices/{device_id}/commands", callback="post", json=json)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: switchbot_api
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: An asynchronous library to use Switchbot API
5
5
  Home-page: https://github.com/SeraphicCorp/py-switchbot-api
6
6
  License: MIT
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
15
16
  Requires-Dist: aiohttp (>=3.8.4,<4.0.0)
16
17
  Project-URL: Repository, https://github.com/SeraphicCorp/py-switchbot-api
17
18
  Description-Content-Type: text/markdown
@@ -0,0 +1,5 @@
1
+ switchbot_api/__init__.py,sha256=pU0GAJ0zoJXxI1RQ8_kxu6gyHgkXWPYHbUSguKfYorg,7978
2
+ switchbot_api-2.3.0.dist-info/LICENSE,sha256=TkgS2kvL9OHFfVrB8jNqEz1_kkR4j0s7fsOgXkluQqo,1070
3
+ switchbot_api-2.3.0.dist-info/METADATA,sha256=_ElS91E9PQHMxKVl8DUpi1psPiXnqcz-wzykqu3g-hY,1200
4
+ switchbot_api-2.3.0.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
5
+ switchbot_api-2.3.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 2.0.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,5 +0,0 @@
1
- switchbot_api/__init__.py,sha256=LON3tU3BEq3myJPnMyZUUeoeXeMnh0set7veRiZFCh4,7896
2
- switchbot_api-2.2.0.dist-info/LICENSE,sha256=TkgS2kvL9OHFfVrB8jNqEz1_kkR4j0s7fsOgXkluQqo,1070
3
- switchbot_api-2.2.0.dist-info/METADATA,sha256=rOKB9PBI0ilwm41keqMoAfvK1g1JMMzKV4JI4mTUV1E,1149
4
- switchbot_api-2.2.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
5
- switchbot_api-2.2.0.dist-info/RECORD,,