diff --git a/custom_components/robovac/tuyalocalapi.py b/custom_components/robovac/tuyalocalapi.py index 55c7abb..ce104f5 100644 --- a/custom_components/robovac/tuyalocalapi.py +++ b/custom_components/robovac/tuyalocalapi.py @@ -721,7 +721,7 @@ async def async_connect(self): self._connected = True if self._ping_task is None: - self.ping_task = asyncio.create_task(self.async_ping(self.ping_interval)) + self._ping_task = asyncio.create_task(self.async_ping(self.ping_interval)) asyncio.create_task(self._async_handle_message()) @@ -780,7 +780,7 @@ async def async_ping(self, ping_interval): self._queue.append(message) await asyncio.sleep(ping_interval) - self.ping_task = asyncio.create_task(self.async_ping(self.ping_interval)) + self._ping_task = asyncio.create_task(self.async_ping(self.ping_interval)) if self.last_pong < self.last_ping: await self.async_disconnect()