PySwitchbot 0.55.0__tar.gz → 0.55.2__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.
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/PKG-INFO +1 -1
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/PySwitchbot.egg-info/PKG-INFO +1 -1
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/setup.py +1 -1
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/__init__.py +2 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/device.py +2 -2
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/lock.py +1 -1
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/relay_switch.py +1 -1
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/LICENSE +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/MANIFEST.in +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/PySwitchbot.egg-info/SOURCES.txt +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/PySwitchbot.egg-info/dependency_links.txt +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/PySwitchbot.egg-info/requires.txt +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/PySwitchbot.egg-info/top_level.txt +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/README.md +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/setup.cfg +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parser.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/__init__.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/blind_tilt.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/bot.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/bulb.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/ceiling_light.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/contact.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/curtain.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/hub2.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/humidifier.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/keypad.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/leak.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/light_strip.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/lock.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/meter.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/motion.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/plug.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/adv_parsers/relay_switch.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/api_config.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/const.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/__init__.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/base_cover.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/base_light.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/blind_tilt.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/bot.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/bulb.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/ceiling_light.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/contact.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/curtain.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/humidifier.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/keypad.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/light_strip.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/meter.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/motion.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/devices/plug.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/discovery.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/enum.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/switchbot/models.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/tests/test_adv_parser.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/tests/test_base_cover.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/tests/test_blind_tilt.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/tests/test_curtain.py +0 -0
- {pyswitchbot-0.55.0 → pyswitchbot-0.55.2}/tests/test_relay_switch.py +0 -0
|
@@ -16,6 +16,7 @@ from .const import (
|
|
|
16
16
|
SwitchbotAuthenticationError,
|
|
17
17
|
SwitchbotModel,
|
|
18
18
|
)
|
|
19
|
+
from .devices.device import SwitchbotEncryptedDevice
|
|
19
20
|
from .devices.base_light import SwitchbotBaseLight
|
|
20
21
|
from .devices.blind_tilt import SwitchbotBlindTilt
|
|
21
22
|
from .devices.bot import Switchbot
|
|
@@ -41,6 +42,7 @@ __all__ = [
|
|
|
41
42
|
"SwitchbotAccountConnectionError",
|
|
42
43
|
"SwitchbotApiError",
|
|
43
44
|
"SwitchbotAuthenticationError",
|
|
45
|
+
"SwitchbotEncryptedDevice",
|
|
44
46
|
"ColorMode",
|
|
45
47
|
"LockStatus",
|
|
46
48
|
"SwitchbotBaseLight",
|
|
@@ -815,13 +815,13 @@ class SwitchbotEncryptedDevice(SwitchbotDevice):
|
|
|
815
815
|
**kwargs: Any,
|
|
816
816
|
) -> bool:
|
|
817
817
|
try:
|
|
818
|
-
|
|
818
|
+
switchbot_device = cls(
|
|
819
819
|
device, key_id=key_id, encryption_key=encryption_key, model=model
|
|
820
820
|
)
|
|
821
821
|
except ValueError:
|
|
822
822
|
return False
|
|
823
823
|
try:
|
|
824
|
-
info = await
|
|
824
|
+
info = await switchbot_device.get_basic_info()
|
|
825
825
|
except SwitchbotOperationError:
|
|
826
826
|
return False
|
|
827
827
|
|
|
@@ -71,7 +71,7 @@ class SwitchbotLock(SwitchbotEncryptedDevice):
|
|
|
71
71
|
model: SwitchbotModel = SwitchbotModel.LOCK,
|
|
72
72
|
**kwargs: Any,
|
|
73
73
|
) -> bool:
|
|
74
|
-
return super().verify_encryption_key(
|
|
74
|
+
return await super().verify_encryption_key(
|
|
75
75
|
device, key_id, encryption_key, model, **kwargs
|
|
76
76
|
)
|
|
77
77
|
|
|
@@ -44,7 +44,7 @@ class SwitchbotRelaySwitch(SwitchbotEncryptedDevice):
|
|
|
44
44
|
model: SwitchbotModel = SwitchbotModel.RELAY_SWITCH_1PM,
|
|
45
45
|
**kwargs: Any,
|
|
46
46
|
) -> bool:
|
|
47
|
-
return super().verify_encryption_key(
|
|
47
|
+
return await super().verify_encryption_key(
|
|
48
48
|
device, key_id, encryption_key, model, **kwargs
|
|
49
49
|
)
|
|
50
50
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|