diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 07aa5ac..b417319 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -36,7 +36,7 @@ class ClientWatcher(QObject): def __init__(self, parent, client, update_s): self.update_s = update_s - self.running = True + self.running = False self.client = client self.watch_task = None super().__init__(parent) @@ -52,6 +52,7 @@ class ClientWatcher(QObject): self.fan_update.emit(await self.client.fan()) def start_watching(self): + self.running = True self.watch_task = asyncio.create_task(self.run()) @pyqtSlot()