1 """The NYT Games integration."""
3 from __future__
import annotations
5 from nyt_games
import NYTGamesClient
12 from .coordinator
import NYTGamesCoordinator
14 PLATFORMS: list[Platform] = [
19 type NYTGamesConfigEntry = ConfigEntry[NYTGamesCoordinator]
23 """Set up NYTGames from a config entry."""
25 client = NYTGamesClient(
31 await coordinator.async_config_entry_first_refresh()
33 entry.runtime_data = coordinator
35 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
41 """Unload a config entry."""
42 return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
bool async_setup_entry(HomeAssistant hass, NYTGamesConfigEntry entry)
bool async_unload_entry(HomeAssistant hass, NYTGamesConfigEntry entry)
aiohttp.ClientSession async_create_clientsession()