Skip to content

Commit ce6127d

Browse files
authored
Adax: Use TextSelectorType.PASSWORD for wifi-password to ensure it's treated as a password (home-assistant#154852)
1 parent 646b1e3 commit ce6127d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

homeassistant/components/adax/config_flow.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
CONF_UNIQUE_ID,
1818
)
1919
from homeassistant.helpers.aiohttp_client import async_get_clientsession
20+
from homeassistant.helpers.selector import (
21+
TextSelector,
22+
TextSelectorConfig,
23+
TextSelectorType,
24+
)
2025

2126
from .const import (
2227
ACCOUNT_ID,
@@ -66,7 +71,15 @@ async def async_step_local(
6671
) -> ConfigFlowResult:
6772
"""Handle the local step."""
6873
data_schema = vol.Schema(
69-
{vol.Required(WIFI_SSID): str, vol.Required(WIFI_PSWD): str}
74+
{
75+
vol.Required(WIFI_SSID): str,
76+
vol.Required(WIFI_PSWD): TextSelector(
77+
TextSelectorConfig(
78+
type=TextSelectorType.PASSWORD,
79+
autocomplete="current-password",
80+
),
81+
),
82+
}
7083
)
7184
if user_input is None:
7285
return self.async_show_form(

0 commit comments

Comments
 (0)