mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Fill in Plaato URL via placeholders (#144754)
This commit is contained in:
parent
00faadcfea
commit
d2ef3ca100
@ -32,6 +32,8 @@ from .const import (
|
|||||||
PLACEHOLDER_WEBHOOK_URL,
|
PLACEHOLDER_WEBHOOK_URL,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AUTH_TOKEN_URL = "https://intercom.help/plaato/en/articles/5004720-auth_token"
|
||||||
|
|
||||||
|
|
||||||
class PlaatoConfigFlow(ConfigFlow, domain=DOMAIN):
|
class PlaatoConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||||
"""Handles a Plaato config flow."""
|
"""Handles a Plaato config flow."""
|
||||||
@ -153,7 +155,10 @@ class PlaatoConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
step_id="api_method",
|
step_id="api_method",
|
||||||
data_schema=data_schema,
|
data_schema=data_schema,
|
||||||
errors=errors,
|
errors=errors,
|
||||||
description_placeholders={PLACEHOLDER_DEVICE_TYPE: device_type.name},
|
description_placeholders={
|
||||||
|
PLACEHOLDER_DEVICE_TYPE: device_type.name,
|
||||||
|
"auth_token_url": AUTH_TOKEN_URL,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _get_webhook_id(self):
|
async def _get_webhook_id(self):
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"api_method": {
|
"api_method": {
|
||||||
"title": "Select API method",
|
"title": "Select API method",
|
||||||
"description": "To be able to query the API an 'auth token' is required which can be obtained by following [these instructions](https://intercom.help/plaato/en/articles/5004720-auth_token)\n\nSelected device: **{device_type}** \n\nIf you prefer to use the built-in webhook method (Airlock only) please check the box below and leave 'Auth token' blank",
|
"description": "To be able to query the API an 'auth token' is required which can be obtained by following [these instructions]({auth_token_url})\n\nSelected device: **{device_type}** \n\nIf you prefer to use the built-in webhook method (Airlock only) please check the box below and leave 'Auth token' blank",
|
||||||
"data": {
|
"data": {
|
||||||
"use_webhook": "Use webhook",
|
"use_webhook": "Use webhook",
|
||||||
"token": "Auth token"
|
"token": "Auth token"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user