extra func out

This commit is contained in:
atse 2024-09-03 21:12:10 +08:00
parent 6473905488
commit 41d4154a28

View File

@ -41,8 +41,10 @@ class Thermostat(QObject, metaclass=PropertyMeta):
async def start_session(self, host, port):
self.connection_state = ThermostatConnectionState.CONNECTING
await self._client.connect(host, port)
self.hw_rev = await self.get_hw_rev()
self.hw_rev = await self._client.hw_rev()
self.connection_state = ThermostatConnectionState.CONNECTED
self.start_watching()
@ -63,9 +65,6 @@ class Thermostat(QObject, metaclass=PropertyMeta):
self._update_params_task = asyncio.create_task(self.update_params())
await asyncio.sleep(self._update_s)
async def get_hw_rev(self):
return await self._client.hw_rev()
async def update_params(self):
if self._poll_for_report:
(