mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Use Textselector in Trafikverket Camera (#105677)
* Use Textselector in Trafikverket Camera * Update homeassistant/components/trafikverket_camera/strings.json Co-authored-by: Jan-Philipp Benecke <jan-philipp@bnck.me> --------- Co-authored-by: Jan-Philipp Benecke <jan-philipp@bnck.me>
This commit is contained in:
parent
d322cb5fdf
commit
5f69749420
@ -17,7 +17,7 @@ from homeassistant import config_entries
|
|||||||
from homeassistant.const import CONF_API_KEY, CONF_ID, CONF_LOCATION
|
from homeassistant.const import CONF_API_KEY, CONF_ID, CONF_LOCATION
|
||||||
from homeassistant.data_entry_flow import FlowResult
|
from homeassistant.data_entry_flow import FlowResult
|
||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
import homeassistant.helpers.config_validation as cv
|
from homeassistant.helpers.selector import TextSelector
|
||||||
|
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ class TVCameraConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
step_id="reauth_confirm",
|
step_id="reauth_confirm",
|
||||||
data_schema=vol.Schema(
|
data_schema=vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Required(CONF_API_KEY): cv.string,
|
vol.Required(CONF_API_KEY): TextSelector(),
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
errors=errors,
|
errors=errors,
|
||||||
@ -123,8 +123,8 @@ class TVCameraConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
step_id="user",
|
step_id="user",
|
||||||
data_schema=vol.Schema(
|
data_schema=vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Required(CONF_API_KEY): cv.string,
|
vol.Required(CONF_API_KEY): TextSelector(),
|
||||||
vol.Required(CONF_LOCATION): cv.string,
|
vol.Required(CONF_LOCATION): TextSelector(),
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
errors=errors,
|
errors=errors,
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
"data": {
|
"data": {
|
||||||
"api_key": "[%key:common::config_flow::data::api_key%]",
|
"api_key": "[%key:common::config_flow::data::api_key%]",
|
||||||
"location": "[%key:common::config_flow::data::location%]"
|
"location": "[%key:common::config_flow::data::location%]"
|
||||||
|
},
|
||||||
|
"data_description": {
|
||||||
|
"location": "Equal or part of name, description or camera id"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user