This commit is contained in:
Jonas Zeunert
2022-08-31 17:34:28 +02:00
parent 9dfd8c5209
commit 7dea027c6c

View File

@@ -42,7 +42,7 @@ class LampGroup:
def toggleRandom(self, sleepTime):
count = random.randint(1,3)
random_lamps = random.choices(self.lamps, count)
random_lamps = random.choices(self.lamps, k=count)
for lamp in random_lamps:
lamp.activate()
time.sleep(sleepTime)