Fix Starlink integration startup issue (#114615)

This commit is contained in:
Fexiven 2024-04-02 12:04:07 +02:00 committed by GitHub
parent 21c7cc3250
commit e473914407
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,14 +58,14 @@ class StarlinkUpdateCoordinator(DataUpdateCoordinator[StarlinkData]):
async def _async_update_data(self) -> StarlinkData: async def _async_update_data(self) -> StarlinkData:
async with asyncio.timeout(4): async with asyncio.timeout(4):
try: try:
status, location, sleep = await asyncio.gather( status = await self.hass.async_add_executor_job(
self.hass.async_add_executor_job(status_data, self.channel_context), status_data, self.channel_context
self.hass.async_add_executor_job( )
location = await self.hass.async_add_executor_job(
location_data, self.channel_context location_data, self.channel_context
), )
self.hass.async_add_executor_job( sleep = await self.hass.async_add_executor_job(
get_sleep_config, self.channel_context get_sleep_config, self.channel_context
),
) )
return StarlinkData(location, sleep, *status) return StarlinkData(location, sleep, *status)
except GrpcError as exc: except GrpcError as exc: