mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Use text selectors for lamarzocco config flow (#134368)
This commit is contained in:
parent
1e70a0060b
commit
a6ba25d3d4
@ -43,6 +43,9 @@ from homeassistant.helpers.selector import (
|
|||||||
SelectSelector,
|
SelectSelector,
|
||||||
SelectSelectorConfig,
|
SelectSelectorConfig,
|
||||||
SelectSelectorMode,
|
SelectSelectorMode,
|
||||||
|
TextSelector,
|
||||||
|
TextSelectorConfig,
|
||||||
|
TextSelectorType,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .const import CONF_USE_BLUETOOTH, DOMAIN
|
from .const import CONF_USE_BLUETOOTH, DOMAIN
|
||||||
@ -141,8 +144,17 @@ class LmConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
step_id="user",
|
step_id="user",
|
||||||
data_schema=vol.Schema(
|
data_schema=vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Required(CONF_USERNAME): str,
|
vol.Required(CONF_USERNAME): TextSelector(
|
||||||
vol.Required(CONF_PASSWORD): str,
|
TextSelectorConfig(
|
||||||
|
type=TextSelectorType.EMAIL, autocomplete="username"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
vol.Required(CONF_PASSWORD): TextSelector(
|
||||||
|
TextSelectorConfig(
|
||||||
|
type=TextSelectorType.PASSWORD,
|
||||||
|
autocomplete="current-password",
|
||||||
|
)
|
||||||
|
),
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
errors=errors,
|
errors=errors,
|
||||||
@ -343,13 +355,20 @@ class LmConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
data_schema=vol.Schema(
|
data_schema=vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Required(
|
vol.Required(
|
||||||
CONF_USERNAME,
|
CONF_USERNAME, default=reconfigure_entry.data[CONF_USERNAME]
|
||||||
default=reconfigure_entry.data[CONF_USERNAME],
|
): TextSelector(
|
||||||
): str,
|
TextSelectorConfig(
|
||||||
|
type=TextSelectorType.EMAIL, autocomplete="username"
|
||||||
|
),
|
||||||
|
),
|
||||||
vol.Required(
|
vol.Required(
|
||||||
CONF_PASSWORD,
|
CONF_PASSWORD, default=reconfigure_entry.data[CONF_PASSWORD]
|
||||||
default=reconfigure_entry.data[CONF_PASSWORD],
|
): TextSelector(
|
||||||
): str,
|
TextSelectorConfig(
|
||||||
|
type=TextSelectorType.PASSWORD,
|
||||||
|
autocomplete="current-password",
|
||||||
|
),
|
||||||
|
),
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user