diff --git a/pytec/pytec/aioclient.py b/pytec/pytec/aioclient.py index 95ca4ad..2e5b22b 100644 --- a/pytec/pytec/aioclient.py +++ b/pytec/pytec/aioclient.py @@ -42,11 +42,11 @@ class Client: await self._check_zero_limits() - def is_connecting(self): + def connecting(self): """Returns True if client is connecting""" return self._connecting_task is not None - def is_connected(self): + def connected(self): """Returns True if client is connected""" return self._writer is not None diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 24abf7a..f909cb0 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -515,7 +515,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): @asyncSlot(int) async def fan_set(self, value): - if not self.client.is_connected(): + if not self.client.connected(): return if self.fan_auto_box.isChecked(): with QSignalBlocker(self.fan_auto_box): @@ -526,7 +526,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): @asyncSlot(int) async def fan_auto_set(self, enabled): - if not self.client.is_connected(): + if not self.client.connected(): return if enabled: await self.client.set_param("fan", "auto") @@ -563,7 +563,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): async def on_connect_btn_clicked(self): host, port = self.host_set_line.text(), self.port_set_spin.value() try: - if not (self.client.is_connecting() or self.client.is_connected()): + if not (self.client.connecting() or self.client.connected()): self.status_lbl.setText("Connecting...") self.connect_btn.setText("Stop") self.host_set_line.setEnabled(False)