summaryrefslogtreecommitdiff
path: root/kvmd/plugins/ugpio/wol.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-09-08 05:43:36 +0300
committerMaxim Devaev <[email protected]>2021-09-08 05:43:36 +0300
commit98ad1145a8782d3b82516dd9f81c86d9e80391c5 (patch)
treeb8f348f0815e8ee72236bf9879af779c95727755 /kvmd/plugins/ugpio/wol.py
parent939c63fe7daf2ddc9a05c9e0fbeab63cb5c6f0c1 (diff)
string pins
Diffstat (limited to 'kvmd/plugins/ugpio/wol.py')
-rw-r--r--kvmd/plugins/ugpio/wol.py10
1 files changed, 8 insertions, 2 deletions
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