Skip to content

Commit 6eebc53

Browse files
committed
more fixes
1 parent 470c056 commit 6eebc53

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

switchbot/devices/device.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
ble_device_has_changed,
2323
establish_connection,
2424
)
25+
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
2526

2627
from ..api_config import SWITCHBOT_APP_API_BASE_URL, SWITCHBOT_APP_CLIENT_ID
2728
from ..const import (
@@ -733,9 +734,7 @@ def __init__(
733734

734735
# Old non-async method preserved for backwards compatibility
735736
@classmethod
736-
def retrieve_encryption_key(
737-
cls: SwitchbotBaseDevice, device_mac: str, username: str, password: str
738-
):
737+
def retrieve_encryption_key(cls, device_mac: str, username: str, password: str):
739738
async def async_fn():
740739
async with aiohttp.ClientSession() as session:
741740
return await cls.async_retrieve_encryption_key(
@@ -746,7 +745,7 @@ async def async_fn():
746745

747746
@classmethod
748747
async def async_retrieve_encryption_key(
749-
cls: SwitchbotBaseDevice,
748+
cls,
750749
session: aiohttp.ClientSession,
751750
device_mac: str,
752751
username: str,

0 commit comments

Comments
 (0)