improved trigger code

This commit is contained in:
2024-12-17 20:48:00 +01:00
parent 35c86ffbd3
commit 494ba80e88
6 changed files with 66 additions and 26 deletions
+4 -2
View File
@@ -1,10 +1,12 @@
from trigger import Trigger
from config import Config
import random
class TestTrigger1(Trigger):
def __init__(self, _config: Config) -> None:
super().__init__(_config)
def run(self) -> bool:
def run(self) -> None:
choices = [False, True]
self.log.info("run check code of %s", self.__class__.__name__)
return False
self.active = random.choice(choices)