From 68990c86cdf256c22c996bbcbf2dd8c04987fb33 Mon Sep 17 00:00:00 2001 From: Simone Chemelli Date: Fri, 2 Oct 2026 13:55:07 +0200 Subject: [PATCH] Use TextSelectors in Vodafone Station (#184018) --- .../vodafone_station/config_flow.py | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/vodafone_station/config_flow.py b/homeassistant/components/vodafone_station/config_flow.py index b7ac0202a0f6..d2dcc2eb0afc 100644 --- a/homeassistant/components/vodafone_station/config_flow.py +++ b/homeassistant/components/vodafone_station/config_flow.py @@ -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" + ) + ) + } )