Limit GitHub API calls during setup (#64956)
This commit is contained in:
parent
07c239643a
commit
3dbad2a44e
1 changed files with 1 additions and 10 deletions
|
@ -1,8 +1,6 @@
|
||||||
"""The GitHub integration."""
|
"""The GitHub integration."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
|
||||||
|
|
||||||
from aiogithubapi import GitHubAPI
|
from aiogithubapi import GitHubAPI
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
@ -54,14 +52,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
await asyncio.gather(
|
await coordinators["information"].async_config_entry_first_refresh()
|
||||||
*(
|
|
||||||
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(),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
hass.data[DOMAIN][repository] = coordinators
|
hass.data[DOMAIN][repository] = coordinators
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue