Use TextSelector in SABnzbd config flow (#131255)
parent
040a73421f
commit
f58a6fa2cb
|
@ -9,6 +9,11 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
|
||||
from homeassistant.const import CONF_API_KEY, CONF_URL
|
||||
from homeassistant.helpers.selector import (
|
||||
TextSelector,
|
||||
TextSelectorConfig,
|
||||
TextSelectorType,
|
||||
)
|
||||
|
||||
from .const import DOMAIN
|
||||
from .sab import get_client
|
||||
|
@ -17,8 +22,16 @@ _LOGGER = logging.getLogger(__name__)
|
|||
|
||||
USER_SCHEMA = vol.Schema(
|
||||
{
|
||||
vol.Required(CONF_API_KEY): str,
|
||||
vol.Required(CONF_URL): str,
|
||||
vol.Required(CONF_URL): TextSelector(
|
||||
TextSelectorConfig(
|
||||
type=TextSelectorType.URL,
|
||||
)
|
||||
),
|
||||
vol.Required(CONF_API_KEY): TextSelector(
|
||||
TextSelectorConfig(
|
||||
type=TextSelectorType.PASSWORD,
|
||||
)
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue