Use TextSelectors in Vodafone Station (#184018)

This commit is contained in:
Simone Chemelli
2026-10-02 13:55:07 +02:00
committed by GitHub
parent 84e7fe2a6e
commit 68990c86cd
@@ -18,6 +18,11 @@ from homeassistant.config_entries import (
)
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.selector import (
TextSelector,
TextSelectorConfig,
TextSelectorType,
)
from .const import (
CONF_DEVICE_DETAILS,
@@ -37,15 +42,27 @@ def user_form_schema(user_input: dict[str, Any] | None) -> probatio.Schema:
user_input = user_input or {}
return probatio.Schema(
{
probatio.Optional(CONF_HOST, default=DEFAULT_HOST): str,
probatio.Optional(CONF_USERNAME, default=DEFAULT_USERNAME): str,
probatio.Required(probatio.Secret(CONF_PASSWORD)): str,
probatio.Optional(CONF_HOST, default=DEFAULT_HOST): TextSelector(),
probatio.Optional(CONF_USERNAME, default=DEFAULT_USERNAME): TextSelector(
TextSelectorConfig(autocomplete="username")
),
probatio.Required(probatio.Secret(CONF_PASSWORD)): TextSelector(
TextSelectorConfig(
type=TextSelectorType.PASSWORD, autocomplete="current-password"
)
),
}
)
STEP_REAUTH_DATA_SCHEMA = probatio.Schema(
{probatio.Required(probatio.Secret(CONF_PASSWORD)): str}
{
probatio.Required(probatio.Secret(CONF_PASSWORD)): TextSelector(
TextSelectorConfig(
type=TextSelectorType.PASSWORD, autocomplete="current-password"
)
)
}
)