summaryrefslogtreecommitdiff
path: root/kvmd/plugins/ugpio/tesmart.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/plugins/ugpio/tesmart.py')
-rw-r--r--kvmd/plugins/ugpio/tesmart.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/kvmd/plugins/ugpio/tesmart.py b/kvmd/plugins/ugpio/tesmart.py
index 4bb2351b..ec513cf4 100644
--- a/kvmd/plugins/ugpio/tesmart.py
+++ b/kvmd/plugins/ugpio/tesmart.py
@@ -21,6 +21,7 @@
import asyncio
+import functools
from typing import Tuple
from typing import Dict
@@ -83,8 +84,8 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
}
@classmethod
- def get_pin_validator(cls) -> Callable[[Any], str]:
- return (lambda arg: str(valid_number(arg, min=0, max=15, name="Tesmart channel")))
+ def get_pin_validator(cls) -> Callable[[Any], Any]:
+ return functools.partial(valid_number, min=0, max=15, name="Tesmart channel")
async def run(self) -> None:
prev_active = -2