diff --git a/aquaPi/machineroom/out_nodes.py b/aquaPi/machineroom/out_nodes.py index bbf9139..4bc1157 100644 --- a/aquaPi/machineroom/out_nodes.py +++ b/aquaPi/machineroom/out_nodes.py @@ -190,7 +190,7 @@ def toggle_and_wait(state: bool, end: float) -> bool: self._thread_stop = False return False time.sleep(.1) - time.sleep(end - time.time()) + time.sleep(max(0, end - time.time())) log.debug(' _pulse needed %f instead of %f', time.time() - start, end - start) return True