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:
@@ -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."""
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user