mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 02:37:50 +00:00
Use TextSelector in SABnzbd config flow (#131255)
This commit is contained in:
parent
040a73421f
commit
f58a6fa2cb
@ -9,6 +9,11 @@ import voluptuous as vol
|
|||||||
|
|
||||||
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
|
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
|
||||||
from homeassistant.const import CONF_API_KEY, CONF_URL
|
from homeassistant.const import CONF_API_KEY, CONF_URL
|
||||||
|
from homeassistant.helpers.selector import (
|
||||||
|
TextSelector,
|
||||||
|
TextSelectorConfig,
|
||||||
|
TextSelectorType,
|
||||||
|
)
|
||||||
|
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
from .sab import get_client
|
from .sab import get_client
|
||||||
@ -17,8 +22,16 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
|
|
||||||
USER_SCHEMA = vol.Schema(
|
USER_SCHEMA = vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Required(CONF_API_KEY): str,
|
vol.Required(CONF_URL): TextSelector(
|
||||||
vol.Required(CONF_URL): str,
|
TextSelectorConfig(
|
||||||
|
type=TextSelectorType.URL,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
vol.Required(CONF_API_KEY): TextSelector(
|
||||||
|
TextSelectorConfig(
|
||||||
|
type=TextSelectorType.PASSWORD,
|
||||||
|
)
|
||||||
|
),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user