Skip to content

Commit

Permalink
Fix Axis reconfigure step not providing protocols as alternatives but…
Browse files Browse the repository at this point in the history
… as string (home-assistant#114889)
  • Loading branch information
Kane610 authored and frenck committed Apr 5, 2024
1 parent 618fa08 commit 2434a22
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions homeassistant/components/axis/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,13 @@ async def _redo_configuration(
self, entry_data: Mapping[str, Any], keep_password: bool
) -> ConfigFlowResult:
"""Re-run configuration step."""
protocol = entry_data.get(CONF_PROTOCOL, "http")
password = entry_data[CONF_PASSWORD] if keep_password else ""
self.discovery_schema = {
vol.Required(
CONF_PROTOCOL, default=entry_data.get(CONF_PROTOCOL, "http")
): str,
vol.Required(CONF_PROTOCOL, default=protocol): vol.In(PROTOCOL_CHOICES),
vol.Required(CONF_HOST, default=entry_data[CONF_HOST]): str,
vol.Required(CONF_USERNAME, default=entry_data[CONF_USERNAME]): str,
vol.Required(
CONF_PASSWORD,
default=entry_data[CONF_PASSWORD] if keep_password else "",
): str,
vol.Required(CONF_PASSWORD, default=password): str,
vol.Required(CONF_PORT, default=entry_data[CONF_PORT]): int,
}

Expand Down

0 comments on commit 2434a22

Please sign in to comment.