diff --git a/letpot/deviceclient.py b/letpot/deviceclient.py index c113c42..32566e5 100644 --- a/letpot/deviceclient.py +++ b/letpot/deviceclient.py @@ -51,7 +51,7 @@ def decorator( @wraps(func) async def wrapper(*args: P.args, **kwargs: P.kwargs) -> _R: self = cast(LetPotDeviceClient, args[0]) - serial = cast(str, args[1]) + serial = cast(str, args[1] if len(args) >= 2 else kwargs["serial"]) exception_message = f"Device missing required feature: {required_feature}" try: supported_features = self._converter(serial).supported_features()