mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Separate status and location check try/catches
This commit is contained in:
@@ -56,13 +56,18 @@ class StarlinkUpdateCoordinator(DataUpdateCoordinator[StarlinkData]):
|
|||||||
status = await self.hass.async_add_executor_job(
|
status = await self.hass.async_add_executor_job(
|
||||||
status_data, self.channel_context
|
status_data, self.channel_context
|
||||||
)
|
)
|
||||||
|
except GrpcError as exc:
|
||||||
|
raise UpdateFailed from exc
|
||||||
|
|
||||||
|
try:
|
||||||
location = await self.hass.async_add_executor_job(
|
location = await self.hass.async_add_executor_job(
|
||||||
location_data, self.channel_context
|
location_data, self.channel_context
|
||||||
)
|
)
|
||||||
return StarlinkData(location, *status)
|
|
||||||
except GrpcError as exc:
|
except GrpcError as exc:
|
||||||
raise UpdateFailed from exc
|
raise UpdateFailed from exc
|
||||||
|
|
||||||
|
return StarlinkData(location, *status)
|
||||||
|
|
||||||
async def async_stow_starlink(self, stow: bool) -> None:
|
async def async_stow_starlink(self, stow: bool) -> None:
|
||||||
"""Set whether Starlink system tied to this coordinator should be stowed."""
|
"""Set whether Starlink system tied to this coordinator should be stowed."""
|
||||||
async with asyncio.timeout(4):
|
async with asyncio.timeout(4):
|
||||||
|
Reference in New Issue
Block a user