Fill in Plaato URL via placeholders (#144754)

This commit is contained in:
Joost Lekkerkerker 2025-05-12 19:37:45 +02:00 committed by GitHub
parent 00faadcfea
commit d2ef3ca100
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -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):

View File

@ -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"