summaryrefslogtreecommitdiff
path: root/kvmd/plugins/atx/disabled.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/plugins/atx/disabled.py')
-rw-r--r--kvmd/plugins/atx/disabled.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/kvmd/plugins/atx/disabled.py b/kvmd/plugins/atx/disabled.py
index d9abec00..60c2fa5b 100644
--- a/kvmd/plugins/atx/disabled.py
+++ b/kvmd/plugins/atx/disabled.py
@@ -36,6 +36,9 @@ class AtxDisabledError(AtxOperationError):
# =====
class Plugin(BaseAtx):
+ def __init__(self) -> None:
+ self.__notifier = aiotools.AioNotifier()
+
async def get_state(self) -> dict:
return {
"enabled": False,
@@ -46,10 +49,13 @@ class Plugin(BaseAtx):
},
}
+ async def trigger_state(self) -> None:
+ self.__notifier.notify()
+
async def poll_state(self) -> AsyncGenerator[dict, None]:
while True:
+ await self.__notifier.wait()
yield (await self.get_state())
- await aiotools.wait_infinite()
# =====