Skip to content

Commit

Permalink
Use reconfigure_confirm in bryant_evolution config flow (#127222)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Oct 1, 2024
1 parent c1fa3d9 commit f4ab741
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
11 changes: 10 additions & 1 deletion homeassistant/components/bryant_evolution/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from collections.abc import Mapping
import logging
from typing import Any

Expand Down Expand Up @@ -61,6 +62,12 @@ async def async_step_user(
)

async def async_step_reconfigure(
self, entry_data: Mapping[str, Any]
) -> ConfigFlowResult:
"""Handle integration reconfiguration."""
return await self.async_step_reconfigure_confirm()

async def async_step_reconfigure_confirm(
self, user_input: dict[str, Any] | None = None
) -> ConfigFlowResult:
"""Handle integration reconfiguration."""
Expand All @@ -83,5 +90,7 @@ async def async_step_reconfigure(
)
errors["base"] = "cannot_connect"
return self.async_show_form(
step_id="reconfigure", data_schema=STEP_USER_DATA_SCHEMA, errors=errors
step_id="reconfigure_confirm",
data_schema=STEP_USER_DATA_SCHEMA,
errors=errors,
)
5 changes: 5 additions & 0 deletions homeassistant/components/bryant_evolution/strings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"config": {
"step": {
"reconfigure": {
"data": {
"filename": "[%key:component::bryant_evolution::config::step::user::data::filename%]"
}
},
"user": {
"data": {
"filename": "Serial port filename"
Expand Down

0 comments on commit f4ab741

Please sign in to comment.