diff --git a/pytec/pytec/gui/model/thermostat.py b/pytec/pytec/gui/model/thermostat.py index ea3191f..a788469 100644 --- a/pytec/pytec/gui/model/thermostat.py +++ b/pytec/pytec/gui/model/thermostat.py @@ -51,6 +51,7 @@ class Thermostat(QObject, metaclass=PropertyMeta): "Encountered an error while updating parameter tree.", exc_info=True, ) + self._watch_task.cancel() _ = self.task.result() self.task = asyncio.create_task(self.update_params()) await asyncio.sleep(self._update_s)