From b26747f527b7871c1749920d66117c574ec14261 Mon Sep 17 00:00:00 2001 From: atse Date: Wed, 28 Aug 2024 10:24:37 +0800 Subject: [PATCH] Descriptive name --- pytec/tec_qt.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index f6e1dcd..c47e142 100755 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -123,20 +123,20 @@ class MainWindow(QtWidgets.QMainWindow): self.loading_spinner.hide() @asyncSlot(ThermostatConnectionState) - async def _on_connection_changed(self, result): - self.graph_group.setEnabled(result == ThermostatConnectionState.CONNECTED) - self.report_group.setEnabled(result == ThermostatConnectionState.CONNECTED) + async def _on_connection_changed(self, state): + self.graph_group.setEnabled(state == ThermostatConnectionState.CONNECTED) + self.report_group.setEnabled(state == ThermostatConnectionState.CONNECTED) self.thermostat_settings.setEnabled( - result == ThermostatConnectionState.CONNECTED + state == ThermostatConnectionState.CONNECTED ) self.conn_menu.host_set_line.setEnabled( - result == ThermostatConnectionState.DISCONNECTED + state == ThermostatConnectionState.DISCONNECTED ) self.conn_menu.port_set_spin.setEnabled( - result == ThermostatConnectionState.DISCONNECTED + state == ThermostatConnectionState.DISCONNECTED ) - match result: + match state: case ThermostatConnectionState.CONNECTED: self.connect_btn.setText("Disconnect") self.status_lbl.setText(