diff --git a/homeassistant/components/nyt_games/__init__.py b/homeassistant/components/nyt_games/__init__.py index ae35b40d29f..94dc22fe89e 100644 --- a/homeassistant/components/nyt_games/__init__.py +++ b/homeassistant/components/nyt_games/__init__.py @@ -7,7 +7,7 @@ from nyt_games import NYTGamesClient from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_TOKEN, Platform from homeassistant.core import HomeAssistant -from homeassistant.helpers.aiohttp_client import async_get_clientsession +from homeassistant.helpers.aiohttp_client import async_create_clientsession from .coordinator import NYTGamesCoordinator @@ -23,7 +23,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: NYTGamesConfigEntry) -> """Set up NYTGames from a config entry.""" client = NYTGamesClient( - entry.data[CONF_TOKEN], session=async_get_clientsession(hass) + entry.data[CONF_TOKEN], session=async_create_clientsession(hass) ) coordinator = NYTGamesCoordinator(hass, client) diff --git a/homeassistant/components/nyt_games/config_flow.py b/homeassistant/components/nyt_games/config_flow.py index 03247d6c194..6676cfad34a 100644 --- a/homeassistant/components/nyt_games/config_flow.py +++ b/homeassistant/components/nyt_games/config_flow.py @@ -7,7 +7,7 @@ import voluptuous as vol from homeassistant.config_entries import ConfigFlow, ConfigFlowResult from homeassistant.const import CONF_TOKEN -from homeassistant.helpers.aiohttp_client import async_get_clientsession +from homeassistant.helpers.aiohttp_client import async_create_clientsession from .const import DOMAIN, LOGGER @@ -21,7 +21,7 @@ class NYTGamesConfigFlow(ConfigFlow, domain=DOMAIN): """Handle a flow initialized by the user.""" errors: dict[str, str] = {} if user_input: - session = async_get_clientsession(self.hass) + session = async_create_clientsession(self.hass) client = NYTGamesClient(user_input[CONF_TOKEN], session=session) try: user_id = await client.get_user_id()