Remove connection errored

This commit is contained in:
atse 2024-08-28 13:38:09 +08:00
parent b3293cd431
commit bb9a363b31

View File

@ -33,7 +33,6 @@ class Thermostat(QObject, metaclass=PropertyMeta):
self._report_mode_task = None
self._poll_for_report = True
self._update_params_task = None
self.connection_errored = False
super().__init__(parent)
async def start_session(self, host, port):
@ -55,7 +54,6 @@ class Thermostat(QObject, metaclass=PropertyMeta):
exc_info=True,
)
self.connection_error.emit()
self.connection_errored = True
return
self._update_params_task = asyncio.create_task(self.update_params())
await asyncio.sleep(self._update_s)
@ -117,7 +115,6 @@ class Thermostat(QObject, metaclass=PropertyMeta):
self.stop_watching()
await self._client.disconnect()
self.connection_state_changed.emit(ThermostatConnectionState.DISCONNECTED)
self.connection_errored = False
async def set_ipv4(self, ipv4):
await self._client.set_param("ipv4", ipv4)