This commit is contained in:
atse 2024-09-09 14:52:33 +08:00
parent 242b516acc
commit 9c0c6ab323

View File

@ -201,11 +201,11 @@ class MainWindow(QtWidgets.QMainWindow):
case ThermostatConnectionState.CONNECTING:
self._connecting_task.cancel()
self._connecting_task = None
await self._thermostat.end_session()
self._thermostat.connection_state = (
ThermostatConnectionState.DISCONNECTED
)
self._connecting_task = None
case ThermostatConnectionState.CONNECTED:
await self._thermostat.end_session()