forked from M-Labs/thermostat
Descriptive name
This commit is contained in:
parent
ac9ddc92a6
commit
2ec059d402
@ -132,20 +132,20 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
self.connect_btn.click()
|
||||
|
||||
@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")
|
||||
hw_rev_d = await self.thermostat.get_hw_rev()
|
||||
|
Loading…
Reference in New Issue
Block a user