mirror of
https://github.com/natekspencer/hacs-oasis_mini.git
synced 2025-12-06 18:44:14 -05:00
Address PR again
This commit is contained in:
@@ -41,7 +41,7 @@ PLATFORMS = [
|
|||||||
def setup_platform_from_coordinator(
|
def setup_platform_from_coordinator(
|
||||||
entry: OasisDeviceConfigEntry,
|
entry: OasisDeviceConfigEntry,
|
||||||
async_add_entities: AddEntitiesCallback,
|
async_add_entities: AddEntitiesCallback,
|
||||||
make_entities: Callable[[OasisDevice], Iterable[OasisDeviceEntity]],
|
make_entities: Callable[[list[OasisDevice]], Iterable[OasisDeviceEntity]],
|
||||||
update_before_add: bool = False,
|
update_before_add: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
@@ -103,7 +103,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: OasisDeviceConfigEntry)
|
|||||||
try:
|
try:
|
||||||
user = await cloud_client.async_get_user()
|
user = await cloud_client.async_get_user()
|
||||||
except UnauthenticatedError as err:
|
except UnauthenticatedError as err:
|
||||||
|
await cloud_client.async_close()
|
||||||
raise ConfigEntryAuthFailed(err) from err
|
raise ConfigEntryAuthFailed(err) from err
|
||||||
|
except Exception:
|
||||||
|
await cloud_client.async_close()
|
||||||
|
raise
|
||||||
|
|
||||||
mqtt_client = OasisMqttClient()
|
mqtt_client = OasisMqttClient()
|
||||||
mqtt_client.start()
|
mqtt_client.start()
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ class OasisDeviceCoordinator(DataUpdateCoordinator[list[OasisDevice]]):
|
|||||||
for device in devices:
|
for device in devices:
|
||||||
try:
|
try:
|
||||||
ready = await self.mqtt_client.wait_until_ready(
|
ready = await self.mqtt_client.wait_until_ready(
|
||||||
device, timeout=3, request_status=True
|
device, request_status=True
|
||||||
)
|
)
|
||||||
if not ready:
|
if not ready:
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
|
|||||||
Reference in New Issue
Block a user