File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
script/scaffold/templates/config_flow_oauth2/integration Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 66from homeassistant .const import Platform
77from homeassistant .core import HomeAssistant
88from homeassistant .exceptions import ConfigEntryNotReady
9- from homeassistant .helpers import aiohttp_client , config_entry_oauth2_flow
9+ from homeassistant .helpers import aiohttp_client
1010from homeassistant .helpers .config_entry_oauth2_flow import (
1111 ImplementationUnavailableError ,
12+ OAuth2Session ,
13+ async_get_config_entry_implementation ,
1214)
1315
1416from . import api
2628async def async_setup_entry (hass : HomeAssistant , entry : New_NameConfigEntry ) -> bool :
2729 """Set up NEW_NAME from a config entry."""
2830 try :
29- implementation = (
30- await config_entry_oauth2_flow .async_get_config_entry_implementation (
31- hass , entry
32- )
33- )
31+ implementation = await async_get_config_entry_implementation (hass , entry )
3432 except ImplementationUnavailableError as err :
3533 raise ConfigEntryNotReady (
3634 "OAuth2 implementation temporarily unavailable, will retry"
3735 ) from err
3836
39- session = config_entry_oauth2_flow . OAuth2Session (hass , entry , implementation )
37+ session = OAuth2Session (hass , entry , implementation )
4038
4139 # If using a requests-based API lib
4240 entry .runtime_data = api .ConfigEntryAuth (hass , session )
You can’t perform that action at this time.
0 commit comments