Separate status and location check try/catches
This commit is contained in:
parent
730129d4e5
commit
7628ec62f6
1 changed files with 6 additions and 1 deletions
|
@ -56,13 +56,18 @@ class StarlinkUpdateCoordinator(DataUpdateCoordinator[StarlinkData]):
|
|||
status = await self.hass.async_add_executor_job(
|
||||
status_data, self.channel_context
|
||||
)
|
||||
except GrpcError as exc:
|
||||
raise UpdateFailed from exc
|
||||
|
||||
try:
|
||||
location = await self.hass.async_add_executor_job(
|
||||
location_data, self.channel_context
|
||||
)
|
||||
return StarlinkData(location, *status)
|
||||
except GrpcError as exc:
|
||||
raise UpdateFailed from exc
|
||||
|
||||
return StarlinkData(location, *status)
|
||||
|
||||
async def async_stow_starlink(self, stow: bool) -> None:
|
||||
"""Set whether Starlink system tied to this coordinator should be stowed."""
|
||||
async with asyncio.timeout(4):
|
||||
|
|
Loading…
Add table
Reference in a new issue