mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Allow connecting an Improv via BLE device to a public network (#102655)
This commit is contained in:
@@ -37,7 +37,7 @@ _T = TypeVar("_T")
|
|||||||
STEP_PROVISION_SCHEMA = vol.Schema(
|
STEP_PROVISION_SCHEMA = vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Required("ssid"): str,
|
vol.Required("ssid"): str,
|
||||||
vol.Required("password"): str,
|
vol.Optional("password"): str,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -236,7 +236,9 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
step_id="provision", data_schema=STEP_PROVISION_SCHEMA
|
step_id="provision", data_schema=STEP_PROVISION_SCHEMA
|
||||||
)
|
)
|
||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
self._credentials = Credentials(user_input["password"], user_input["ssid"])
|
self._credentials = Credentials(
|
||||||
|
user_input.get("password", ""), user_input["ssid"]
|
||||||
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
need_authorization = await self._try_call(self._device.need_authorization())
|
need_authorization = await self._try_call(self._device.need_authorization())
|
||||||
|
Reference in New Issue
Block a user