async_get_url -> get_url (#35382)

This commit is contained in:
Franck Nijhof authored and GitHub committed 2020-05-08 21:53:28 +02:00
1 parent 62f2520ee1
commit e3e3a113e9
25 files changed
+243 -315

No files matched your search

+2 -4
View File
@@ -22,7 +22,7 @@ from homeassistant.const import (
from homeassistant.core import callback
from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.network import async_get_url
from homeassistant.helpers.network import get_url
from .const import ( # pylint: disable=unused-import
AUTH_CALLBACK_NAME,
@@ -280,9 +280,7 @@ class PlexFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
session = async_get_clientsession(self.hass)
self.plexauth = PlexAuth(payload, session)
await self.plexauth.initiate_auth()
forward_url = (
f"{async_get_url(self.hass)}{AUTH_CALLBACK_PATH}?flow_id={self.flow_id}"
)
forward_url = f"{get_url(self.hass)}{AUTH_CALLBACK_PATH}?flow_id={self.flow_id}"
auth_url = self.plexauth.auth_url(forward_url)
return self.async_external_step(step_id="obtain_token", url=auth_url)