Skip to content

Commit 22d421c

Browse files
authored
Fix missing await in SwitchbotRelaySwitch and SwitchbotLock verify_encryption_key (#279)
1 parent a058ec7 commit 22d421c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

switchbot/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
SwitchbotAuthenticationError,
1717
SwitchbotModel,
1818
)
19+
from .devices.device import SwitchbotEncryptedDevice
1920
from .devices.base_light import SwitchbotBaseLight
2021
from .devices.blind_tilt import SwitchbotBlindTilt
2122
from .devices.bot import Switchbot
@@ -41,6 +42,7 @@
4142
"SwitchbotAccountConnectionError",
4243
"SwitchbotApiError",
4344
"SwitchbotAuthenticationError",
45+
"SwitchbotEncryptedDevice",
4446
"ColorMode",
4547
"LockStatus",
4648
"SwitchbotBaseLight",

switchbot/devices/lock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async def verify_encryption_key(
7171
model: SwitchbotModel = SwitchbotModel.LOCK,
7272
**kwargs: Any,
7373
) -> bool:
74-
return super().verify_encryption_key(
74+
return await super().verify_encryption_key(
7575
device, key_id, encryption_key, model, **kwargs
7676
)
7777

switchbot/devices/relay_switch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async def verify_encryption_key(
4444
model: SwitchbotModel = SwitchbotModel.RELAY_SWITCH_1PM,
4545
**kwargs: Any,
4646
) -> bool:
47-
return super().verify_encryption_key(
47+
return await super().verify_encryption_key(
4848
device, key_id, encryption_key, model, **kwargs
4949
)
5050

0 commit comments

Comments
 (0)