mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Fix Axis reconfigure step not providing protocols as alternatives but as string (#114889)
This commit is contained in:
parent
bfe944f666
commit
b67e9b28d6
@ -168,16 +168,13 @@ class AxisFlowHandler(ConfigFlow, domain=AXIS_DOMAIN):
|
|||||||
self, entry_data: Mapping[str, Any], keep_password: bool
|
self, entry_data: Mapping[str, Any], keep_password: bool
|
||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Re-run configuration step."""
|
"""Re-run configuration step."""
|
||||||
|
protocol = entry_data.get(CONF_PROTOCOL, "http")
|
||||||
|
password = entry_data[CONF_PASSWORD] if keep_password else ""
|
||||||
self.discovery_schema = {
|
self.discovery_schema = {
|
||||||
vol.Required(
|
vol.Required(CONF_PROTOCOL, default=protocol): vol.In(PROTOCOL_CHOICES),
|
||||||
CONF_PROTOCOL, default=entry_data.get(CONF_PROTOCOL, "http")
|
|
||||||
): str,
|
|
||||||
vol.Required(CONF_HOST, default=entry_data[CONF_HOST]): str,
|
vol.Required(CONF_HOST, default=entry_data[CONF_HOST]): str,
|
||||||
vol.Required(CONF_USERNAME, default=entry_data[CONF_USERNAME]): str,
|
vol.Required(CONF_USERNAME, default=entry_data[CONF_USERNAME]): str,
|
||||||
vol.Required(
|
vol.Required(CONF_PASSWORD, default=password): str,
|
||||||
CONF_PASSWORD,
|
|
||||||
default=entry_data[CONF_PASSWORD] if keep_password else "",
|
|
||||||
): str,
|
|
||||||
vol.Required(CONF_PORT, default=entry_data[CONF_PORT]): int,
|
vol.Required(CONF_PORT, default=entry_data[CONF_PORT]): int,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user