Limit GitHub API calls during setup (#64956)

pull/64958/head
Joakim Sørensen 2022-01-26 09:58:04 +01:00 committed by GitHub
parent 07c239643a
commit 3dbad2a44e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 10 deletions

View File

@ -1,8 +1,6 @@
"""The GitHub integration."""
from __future__ import annotations
import asyncio
from aiogithubapi import GitHubAPI
from homeassistant.config_entries import ConfigEntry
@ -54,14 +52,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
),
}
await asyncio.gather(
*(
coordinators["information"].async_config_entry_first_refresh(),
coordinators["release"].async_config_entry_first_refresh(),
coordinators["issue"].async_config_entry_first_refresh(),
coordinators["commit"].async_config_entry_first_refresh(),
)
)
await coordinators["information"].async_config_entry_first_refresh()
hass.data[DOMAIN][repository] = coordinators