From 98ad1145a8782d3b82516dd9f81c86d9e80391c5 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Wed, 8 Sep 2021 05:43:36 +0300 Subject: string pins --- kvmd/plugins/ugpio/wol.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'kvmd/plugins/ugpio/wol.py') diff --git a/kvmd/plugins/ugpio/wol.py b/kvmd/plugins/ugpio/wol.py index 842ebd47..1305b3e6 100644 --- a/kvmd/plugins/ugpio/wol.py +++ b/kvmd/plugins/ugpio/wol.py @@ -24,7 +24,9 @@ import socket import functools from typing import Dict +from typing import Callable from typing import Optional +from typing import Any from ...logging import get_logger @@ -66,11 +68,15 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute "mac": Option("", type=valid_mac, if_empty=""), } - async def read(self, pin: int) -> bool: + @classmethod + def get_pin_validator(cls) -> Callable[[Any], str]: + return str + + async def read(self, pin: str) -> bool: _ = pin return False - async def write(self, pin: int, state: bool) -> None: + async def write(self, pin: str, state: bool) -> None: _ = pin if not state: return -- cgit v1.2.3