1
0
mirror of https://github.com/natekspencer/hacs-oasis_mini.git synced 2025-11-13 23:53:51 -05:00

3 Commits
0.7.2 ... 0.7.3

Author SHA1 Message Date
Nathan Spencer
3acd45da9d Merge pull request #14 from natekspencer/dev
Revert command timeout logic
2024-07-31 21:04:57 -06:00
Nathan Spencer
a736c72c8e Revert timeout changes, I'll fix later 2024-07-31 21:03:33 -06:00
Nathan Spencer
c87bb241ef Allow reboot command even if device is busy 2024-07-31 20:55:37 -06:00

View File

@@ -6,7 +6,6 @@ from typing import Any, Awaitable, Callable, Final
from urllib.parse import urljoin from urllib.parse import urljoin
from aiohttp import ClientResponseError, ClientSession from aiohttp import ClientResponseError, ClientSession
import async_timeout
from .utils import _bit_to_bool from .utils import _bit_to_bool
@@ -400,11 +399,8 @@ class OasisMini:
async def _async_command(self, **kwargs: Any) -> str | None: async def _async_command(self, **kwargs: Any) -> str | None:
"""Send a command to the device.""" """Send a command to the device."""
with async_timeout.timeout(5): result = await self._async_get(**kwargs)
while self.busy: _LOGGER.debug("Result: %s", result)
await asyncio.sleep(0.1)
result = await self._async_get(**kwargs)
_LOGGER.debug("Result: %s", result)
async def _async_get(self, **kwargs: Any) -> str | None: async def _async_get(self, **kwargs: Any) -> str | None:
"""Perform a GET request.""" """Perform a GET request."""