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
2 changed files with 7 additions and 4 deletions
|
@ -17,7 +17,7 @@ from homeassistant import config_entries
|
|||
from homeassistant.const import CONF_API_KEY, CONF_ID, CONF_LOCATION
|
||||
from homeassistant.data_entry_flow import FlowResult
|
||||
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
|
||||
|
||||
|
@ -90,7 +90,7 @@ class TVCameraConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
step_id="reauth_confirm",
|
||||
data_schema=vol.Schema(
|
||||
{
|
||||
vol.Required(CONF_API_KEY): cv.string,
|
||||
vol.Required(CONF_API_KEY): TextSelector(),
|
||||
}
|
||||
),
|
||||
errors=errors,
|
||||
|
@ -123,8 +123,8 @@ class TVCameraConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
step_id="user",
|
||||
data_schema=vol.Schema(
|
||||
{
|
||||
vol.Required(CONF_API_KEY): cv.string,
|
||||
vol.Required(CONF_LOCATION): cv.string,
|
||||
vol.Required(CONF_API_KEY): TextSelector(),
|
||||
vol.Required(CONF_LOCATION): TextSelector(),
|
||||
}
|
||||
),
|
||||
errors=errors,
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
"data": {
|
||||
"api_key": "[%key:common::config_flow::data::api_key%]",
|
||||
"location": "[%key:common::config_flow::data::location%]"
|
||||
},
|
||||
"data_description": {
|
||||
"location": "Equal or part of name, description or camera id"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue