1
0
mirror of https://github.com/natekspencer/hacs-oasis_mini.git synced 2025-12-06 18:44:14 -05:00

Don't wait on devices to initialize during coordinator update, implement dispatcher for device initialization/setup

This commit is contained in:
Nathan Spencer
2025-11-25 16:29:36 +00:00
parent d9fa3b8c9e
commit eecf5e90dc
4 changed files with 89 additions and 39 deletions

View File

@@ -215,7 +215,8 @@ class OasisMqttClient(OasisClientProtocol):
self._subscribed_serials.clear()
for serial, device in self._devices.items():
await self._subscribe_serial(serial)
await self.async_get_all(device)
if not device.is_sleeping:
await self.async_get_all(device)
def start(self) -> None:
"""Start MQTT connection loop."""

View File

@@ -495,6 +495,11 @@ class OasisDevice:
except Exception:
_LOGGER.exception("Error in update listener")
async def async_get_status(self) -> None:
"""Request the device update it's current status."""
client = self._require_client()
await client.async_get_status(self)
async def async_get_mac_address(self) -> str | None:
"""
Get the device MAC address, requesting it from the attached transport client if not already known.