Home Assistant Unofficial Reference
2024.12.1
application_credentials.py
Go to the documentation of this file.
1
"""application_credentials platform the myUplink integration."""
2
3
from
homeassistant.components.application_credentials
import
AuthorizationServer
4
from
homeassistant.core
import
HomeAssistant
5
6
from
.const
import
DOMAIN, OAUTH2_AUTHORIZE, OAUTH2_TOKEN
7
8
9
async
def
async_get_authorization_server
(hass: HomeAssistant) -> AuthorizationServer:
10
"""Return authorization server."""
11
return
AuthorizationServer
(
12
authorize_url=OAUTH2_AUTHORIZE,
13
token_url=OAUTH2_TOKEN,
14
)
15
16
17
async
def
async_get_description_placeholders
(hass: HomeAssistant) -> dict[str, str]:
18
"""Return description placeholders for the credentials dialog."""
19
return
{
20
"more_info_url"
: f
"https://www.home-assistant.io/integrations/{DOMAIN}/"
,
21
"create_creds_url"
:
"https://dev.myuplink.com/apps"
,
22
"callback_url"
:
"https://my.home-assistant.io/redirect/oauth"
,
23
}
homeassistant.components.application_credentials.AuthorizationServer
Definition:
__init__.py:75
homeassistant.components.application_credentials
Definition:
__init__.py:1
homeassistant.components.myuplink.application_credentials.async_get_description_placeholders
dict[str, str] async_get_description_placeholders(HomeAssistant hass)
Definition:
application_credentials.py:17
homeassistant.components.myuplink.application_credentials.async_get_authorization_server
AuthorizationServer async_get_authorization_server(HomeAssistant hass)
Definition:
application_credentials.py:9
homeassistant.core
Definition:
core.py:1
core
homeassistant
components
myuplink
application_credentials.py
Generated by
1.9.1