From 25aea140be4a159d7006a4e703d23c102f50d043 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 14 Oct 2024 12:57:15 +0200 Subject: [PATCH] Cleanup unnecessary reconfigure_confirm from config flows (#128086) --- homeassistant/components/brother/config_flow.py | 8 +------- homeassistant/components/brother/strings.json | 2 +- .../components/bryant_evolution/config_flow.py | 8 +------- .../components/bryant_evolution/strings.json | 2 +- .../components/enphase_envoy/config_flow.py | 8 +------- .../components/enphase_envoy/strings.json | 2 +- homeassistant/components/feedreader/config_flow.py | 10 ++-------- homeassistant/components/feedreader/strings.json | 2 +- .../components/google_travel_time/config_flow.py | 8 +------- .../components/google_travel_time/strings.json | 2 +- homeassistant/components/holiday/config_flow.py | 10 +--------- homeassistant/components/holiday/strings.json | 2 +- homeassistant/components/homeworks/config_flow.py | 8 +------- homeassistant/components/homeworks/strings.json | 6 +++--- homeassistant/components/lamarzocco/config_flow.py | 8 +------- homeassistant/components/lamarzocco/strings.json | 2 +- homeassistant/components/lcn/config_flow.py | 8 +------- homeassistant/components/lcn/strings.json | 2 +- homeassistant/components/madvr/config_flow.py | 8 +------- homeassistant/components/madvr/strings.json | 2 +- homeassistant/components/mealie/config_flow.py | 8 +------- homeassistant/components/mealie/strings.json | 2 +- homeassistant/components/melcloud/config_flow.py | 8 +------- homeassistant/components/melcloud/strings.json | 2 +- homeassistant/components/nam/config_flow.py | 11 ++--------- homeassistant/components/nam/strings.json | 2 +- homeassistant/components/pyload/config_flow.py | 8 +------- homeassistant/components/pyload/strings.json | 2 +- homeassistant/components/shelly/config_flow.py | 14 +++----------- homeassistant/components/shelly/strings.json | 2 +- homeassistant/components/smhi/config_flow.py | 8 +------- homeassistant/components/smhi/strings.json | 2 +- homeassistant/components/solarlog/config_flow.py | 8 +------- homeassistant/components/solarlog/strings.json | 2 +- homeassistant/components/tado/config_flow.py | 8 +------- homeassistant/components/tado/strings.json | 2 +- homeassistant/components/vallox/config_flow.py | 10 ++-------- homeassistant/components/vallox/strings.json | 2 +- tests/components/brother/test_config_flow.py | 14 +++++++------- tests/components/enphase_envoy/test_config_flow.py | 8 ++++---- tests/components/feedreader/test_config_flow.py | 6 +++--- .../google_travel_time/test_config_flow.py | 2 +- tests/components/homeworks/test_config_flow.py | 12 ++++++------ tests/components/lamarzocco/test_config_flow.py | 2 +- tests/components/lcn/test_config_flow.py | 4 ++-- tests/components/madvr/test_config_flow.py | 4 ++-- tests/components/mealie/test_config_flow.py | 8 ++++---- tests/components/nam/test_config_flow.py | 8 ++++---- tests/components/pyload/test_config_flow.py | 4 ++-- tests/components/shelly/test_config_flow.py | 6 +++--- tests/components/solarlog/test_config_flow.py | 2 +- tests/components/vallox/conftest.py | 2 +- 52 files changed, 86 insertions(+), 205 deletions(-) diff --git a/homeassistant/components/brother/config_flow.py b/homeassistant/components/brother/config_flow.py index ffc2b3bfa8ac80..d9130b96300b19 100644 --- a/homeassistant/components/brother/config_flow.py +++ b/homeassistant/components/brother/config_flow.py @@ -141,12 +141,6 @@ async def async_step_zeroconf_confirm( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle a reconfiguration flow initialized by the user.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" entry = self._get_reconfigure_entry() @@ -170,7 +164,7 @@ async def async_step_reconfigure_confirm( ) return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=self.add_suggested_values_to_schema( data_schema=RECONFIGURE_SCHEMA, suggested_values=entry.data | (user_input or {}), diff --git a/homeassistant/components/brother/strings.json b/homeassistant/components/brother/strings.json index d7f8f4a1b8975e..3b5b38ce9a05dd 100644 --- a/homeassistant/components/brother/strings.json +++ b/homeassistant/components/brother/strings.json @@ -18,7 +18,7 @@ "type": "[%key:component::brother::config::step::user::data::type%]" } }, - "reconfigure_confirm": { + "reconfigure": { "description": "Update configuration for {printer_name}.", "data": { "host": "[%key:common::config_flow::data::host%]" diff --git a/homeassistant/components/bryant_evolution/config_flow.py b/homeassistant/components/bryant_evolution/config_flow.py index 9e115bd69eee84..2e5a094948d887 100644 --- a/homeassistant/components/bryant_evolution/config_flow.py +++ b/homeassistant/components/bryant_evolution/config_flow.py @@ -61,12 +61,6 @@ async def async_step_user( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> 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.""" errors: dict[str, str] = {} @@ -82,7 +76,7 @@ async def async_step_reconfigure_confirm( ) errors["base"] = "cannot_connect" return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=STEP_USER_DATA_SCHEMA, errors=errors, ) diff --git a/homeassistant/components/bryant_evolution/strings.json b/homeassistant/components/bryant_evolution/strings.json index 11ce4bc6ce7e5d..ec816d3d9613d4 100644 --- a/homeassistant/components/bryant_evolution/strings.json +++ b/homeassistant/components/bryant_evolution/strings.json @@ -1,7 +1,7 @@ { "config": { "step": { - "reconfigure_confirm": { + "reconfigure": { "data": { "filename": "[%key:component::bryant_evolution::config::step::user::data::filename%]" } diff --git a/homeassistant/components/enphase_envoy/config_flow.py b/homeassistant/components/enphase_envoy/config_flow.py index 8c1c0983417a8e..d04f77d8e88ff6 100644 --- a/homeassistant/components/enphase_envoy/config_flow.py +++ b/homeassistant/components/enphase_envoy/config_flow.py @@ -234,12 +234,6 @@ async def async_step_user( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Add reconfigure step to allow to manually reconfigure a config entry.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Add reconfigure step to allow to manually reconfigure a config entry.""" reconfigure_entry = self._get_reconfigure_entry() @@ -285,7 +279,7 @@ async def async_step_reconfigure_confirm( suggested_values: Mapping[str, Any] = user_input or reconfigure_entry.data return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=self.add_suggested_values_to_schema( self._async_generate_schema(), suggested_values ), diff --git a/homeassistant/components/enphase_envoy/strings.json b/homeassistant/components/enphase_envoy/strings.json index b7a125d039b078..2d91b3b0960c3c 100644 --- a/homeassistant/components/enphase_envoy/strings.json +++ b/homeassistant/components/enphase_envoy/strings.json @@ -13,7 +13,7 @@ "host": "The hostname or IP address of your Enphase Envoy gateway." } }, - "reconfigure_confirm": { + "reconfigure": { "description": "[%key:component::enphase_envoy::config::step::user::description%]", "data": { "host": "[%key:common::config_flow::data::host%]", diff --git a/homeassistant/components/feedreader/config_flow.py b/homeassistant/components/feedreader/config_flow.py index 8c61a2f339f7ea..2a73e24a3e52f0 100644 --- a/homeassistant/components/feedreader/config_flow.py +++ b/homeassistant/components/feedreader/config_flow.py @@ -121,12 +121,6 @@ async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResu async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle a reconfiguration flow initialized by the user.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" reconfigure_entry = self._get_reconfigure_entry() @@ -134,7 +128,7 @@ async def async_step_reconfigure_confirm( return self.show_user_form( user_input={**reconfigure_entry.data}, description_placeholders={"name": reconfigure_entry.title}, - step_id="reconfigure_confirm", + step_id="reconfigure", ) feed = await async_fetch_feed(self.hass, user_input[CONF_URL]) @@ -145,7 +139,7 @@ async def async_step_reconfigure_confirm( return self.show_user_form( user_input=user_input, description_placeholders={"name": reconfigure_entry.title}, - step_id="reconfigure_confirm", + step_id="reconfigure", errors={"base": "url_error"}, ) diff --git a/homeassistant/components/feedreader/strings.json b/homeassistant/components/feedreader/strings.json index da66333fa5bcc6..0f0492eb6c9f4e 100644 --- a/homeassistant/components/feedreader/strings.json +++ b/homeassistant/components/feedreader/strings.json @@ -6,7 +6,7 @@ "url": "[%key:common::config_flow::data::url%]" } }, - "reconfigure_confirm": { + "reconfigure": { "description": "Update your configuration information for {name}.", "data": { "url": "[%key:common::config_flow::data::url%]" diff --git a/homeassistant/components/google_travel_time/config_flow.py b/homeassistant/components/google_travel_time/config_flow.py index b7a26d3a4eb140..ee809a23aea8f4 100644 --- a/homeassistant/components/google_travel_time/config_flow.py +++ b/homeassistant/components/google_travel_time/config_flow.py @@ -236,12 +236,6 @@ async def async_step_user(self, user_input=None) -> ConfigFlowResult: async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle reconfiguration.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle reconfiguration.""" errors: dict[str, str] | None = None @@ -253,7 +247,7 @@ async def async_step_reconfigure_confirm( ) return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=self.add_suggested_values_to_schema( RECONFIGURE_SCHEMA, self._get_reconfigure_entry().data ), diff --git a/homeassistant/components/google_travel_time/strings.json b/homeassistant/components/google_travel_time/strings.json index 6397336d9ac9e6..765cfc9c4b67d6 100644 --- a/homeassistant/components/google_travel_time/strings.json +++ b/homeassistant/components/google_travel_time/strings.json @@ -11,7 +11,7 @@ "destination": "Destination" } }, - "reconfigure_confirm": { + "reconfigure": { "description": "[%key:component::google_travel_time::config::step::user::description%]", "data": { "api_key": "[%key:common::config_flow::data::api_key%]", diff --git a/homeassistant/components/holiday/config_flow.py b/homeassistant/components/holiday/config_flow.py index 0284ac5c876f11..27b13e34851bc3 100644 --- a/homeassistant/components/holiday/config_flow.py +++ b/homeassistant/components/holiday/config_flow.py @@ -112,12 +112,6 @@ async def async_step_province( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle the re-configuration of a province.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle the re-configuration of a province.""" reconfigure_entry = self._get_reconfigure_entry() @@ -160,6 +154,4 @@ async def async_step_reconfigure_confirm( } ) - return self.async_show_form( - step_id="reconfigure_confirm", data_schema=province_schema - ) + return self.async_show_form(step_id="reconfigure", data_schema=province_schema) diff --git a/homeassistant/components/holiday/strings.json b/homeassistant/components/holiday/strings.json index de013f44d6083a..ae4930ecdb44be 100644 --- a/homeassistant/components/holiday/strings.json +++ b/homeassistant/components/holiday/strings.json @@ -16,7 +16,7 @@ "province": "Province" } }, - "reconfigure_confirm": { + "reconfigure": { "data": { "province": "[%key:component::holiday::config::step::province::data::province%]" } diff --git a/homeassistant/components/homeworks/config_flow.py b/homeassistant/components/homeworks/config_flow.py index e08110cc8b0166..3af963e3d5c914 100644 --- a/homeassistant/components/homeworks/config_flow.py +++ b/homeassistant/components/homeworks/config_flow.py @@ -581,12 +581,6 @@ async def _validate_edit_controller( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle a reconfigure flow.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfigure flow.""" errors = {} @@ -628,7 +622,7 @@ async def async_step_reconfigure_confirm( ) return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=self.add_suggested_values_to_schema( DATA_SCHEMA_EDIT_CONTROLLER, suggested_values ), diff --git a/homeassistant/components/homeworks/strings.json b/homeassistant/components/homeworks/strings.json index c2c8a14f77c0db..a9dcab2f1e0a2e 100644 --- a/homeassistant/components/homeworks/strings.json +++ b/homeassistant/components/homeworks/strings.json @@ -22,7 +22,7 @@ "name": "[%key:component::homeworks::config::step::user::data_description::name%]" } }, - "reconfigure_confirm": { + "reconfigure": { "data": { "host": "[%key:common::config_flow::data::host%]", "port": "[%key:common::config_flow::data::port%]", @@ -45,8 +45,8 @@ }, "data_description": { "name": "A unique name identifying the Lutron Homeworks controller", - "password": "[%key:component::homeworks::config::step::reconfigure_confirm::data_description::password%]", - "username": "[%key:component::homeworks::config::step::reconfigure_confirm::data_description::username%]" + "password": "[%key:component::homeworks::config::step::reconfigure::data_description::password%]", + "username": "[%key:component::homeworks::config::step::reconfigure::data_description::username%]" }, "description": "Add a Lutron Homeworks controller" } diff --git a/homeassistant/components/lamarzocco/config_flow.py b/homeassistant/components/lamarzocco/config_flow.py index 0c359a536311c1..438bf7fe6b98ce 100644 --- a/homeassistant/components/lamarzocco/config_flow.py +++ b/homeassistant/components/lamarzocco/config_flow.py @@ -284,16 +284,10 @@ async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Perform reconfiguration of the config entry.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Confirm reconfiguration of the device.""" if not user_input: reconfigure_entry = self._get_reconfigure_entry() return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=vol.Schema( { vol.Required( diff --git a/homeassistant/components/lamarzocco/strings.json b/homeassistant/components/lamarzocco/strings.json index 71b13e2b789eed..6188b9d3d67d25 100644 --- a/homeassistant/components/lamarzocco/strings.json +++ b/homeassistant/components/lamarzocco/strings.json @@ -47,7 +47,7 @@ "password": "[%key:component::lamarzocco::config::step::user::data_description::password%]" } }, - "reconfigure_confirm": { + "reconfigure": { "data": { "username": "[%key:common::config_flow::data::username%]", "password": "[%key:common::config_flow::data::password%]" diff --git a/homeassistant/components/lcn/config_flow.py b/homeassistant/components/lcn/config_flow.py index e8b462bd3215ac..ca72b1ca53f7ba 100644 --- a/homeassistant/components/lcn/config_flow.py +++ b/homeassistant/components/lcn/config_flow.py @@ -194,12 +194,6 @@ async def async_step_user( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> config_entries.ConfigFlowResult: - """Reconfigure LCN configuration.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> config_entries.ConfigFlowResult: """Reconfigure LCN configuration.""" reconfigure_entry = self._get_reconfigure_entry() @@ -219,7 +213,7 @@ async def async_step_reconfigure_confirm( await self.hass.config_entries.async_setup(reconfigure_entry.entry_id) return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=self.add_suggested_values_to_schema( CONFIG_SCHEMA, reconfigure_entry.data ), diff --git a/homeassistant/components/lcn/strings.json b/homeassistant/components/lcn/strings.json index 90650c2aed1f3d..9b5ce8c9cc0b7b 100644 --- a/homeassistant/components/lcn/strings.json +++ b/homeassistant/components/lcn/strings.json @@ -34,7 +34,7 @@ "acknowledge": "Retry sendig commands if no response is received (increases bus traffic)." } }, - "reconfigure_confirm": { + "reconfigure": { "title": "Reconfigure LCN host", "description": "Reconfigure connection to LCN host.", "data": { diff --git a/homeassistant/components/madvr/config_flow.py b/homeassistant/components/madvr/config_flow.py index 9151df1ef3cd7b..60f7b8fc481574 100644 --- a/homeassistant/components/madvr/config_flow.py +++ b/homeassistant/components/madvr/config_flow.py @@ -44,15 +44,9 @@ async def async_step_user( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle reconfiguration of the device.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" - return await self._handle_config_step(user_input, step_id="reconfigure_confirm") + return await self._handle_config_step(user_input, step_id="reconfigure") async def _handle_config_step( self, user_input: dict[str, Any] | None = None, step_id: str = "user" diff --git a/homeassistant/components/madvr/strings.json b/homeassistant/components/madvr/strings.json index 9c7594c68d0435..06851efa2c8d4f 100644 --- a/homeassistant/components/madvr/strings.json +++ b/homeassistant/components/madvr/strings.json @@ -13,7 +13,7 @@ "port": "The port your madVR Envy is listening on. In 99% of cases, leave this as the default." } }, - "reconfigure_confirm": { + "reconfigure": { "title": "Reconfigure madVR Envy", "description": "Your device needs to be on in order to reconfigure the integation.", "data": { diff --git a/homeassistant/components/mealie/config_flow.py b/homeassistant/components/mealie/config_flow.py index b1ce6f7147b2ce..2f90ceaf97afc7 100644 --- a/homeassistant/components/mealie/config_flow.py +++ b/homeassistant/components/mealie/config_flow.py @@ -116,12 +116,6 @@ async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle reconfiguration of the integration.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle reconfiguration confirmation.""" errors: dict[str, str] = {} if user_input: self.host = user_input[CONF_HOST] @@ -141,7 +135,7 @@ async def async_step_reconfigure_confirm( }, ) return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=USER_SCHEMA, errors=errors, ) diff --git a/homeassistant/components/mealie/strings.json b/homeassistant/components/mealie/strings.json index 72f2d769dd22dc..b59399815ea03a 100644 --- a/homeassistant/components/mealie/strings.json +++ b/homeassistant/components/mealie/strings.json @@ -17,7 +17,7 @@ "api_token": "[%key:common::config_flow::data::api_token%]" } }, - "reconfigure_confirm": { + "reconfigure": { "description": "Please reconfigure with Mealie.", "data": { "host": "[%key:common::config_flow::data::url%]", diff --git a/homeassistant/components/melcloud/config_flow.py b/homeassistant/components/melcloud/config_flow.py index 8e981986dd7724..b604ee5016e860 100644 --- a/homeassistant/components/melcloud/config_flow.py +++ b/homeassistant/components/melcloud/config_flow.py @@ -142,12 +142,6 @@ async def async_reauthenticate_client( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle a reconfiguration flow initialized by the user.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" errors: dict[str, str] = {} @@ -190,7 +184,7 @@ async def async_step_reconfigure_confirm( ) return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=vol.Schema( { vol.Required(CONF_PASSWORD): str, diff --git a/homeassistant/components/melcloud/strings.json b/homeassistant/components/melcloud/strings.json index 968f9cf4e50856..13ce0ebfa57eec 100644 --- a/homeassistant/components/melcloud/strings.json +++ b/homeassistant/components/melcloud/strings.json @@ -17,7 +17,7 @@ "password": "[%key:common::config_flow::data::password%]" } }, - "reconfigure_confirm": { + "reconfigure": { "title": "Reconfigure your MelCloud", "description": "Reconfigure the entry to obtain a new token, for your account: `{username}`.", "data": { diff --git a/homeassistant/components/nam/config_flow.py b/homeassistant/components/nam/config_flow.py index 1b9a654e55eb59..494ce9fdac03da 100644 --- a/homeassistant/components/nam/config_flow.py +++ b/homeassistant/components/nam/config_flow.py @@ -220,18 +220,11 @@ async def async_step_reauth_confirm( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle a reconfiguration flow initialized by the user.""" - self.host = self._get_reconfigure_entry().data[CONF_HOST] - - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" errors = {} reconfigure_entry = self._get_reconfigure_entry() + self.host = reconfigure_entry.data[CONF_HOST] if user_input is not None: try: @@ -247,7 +240,7 @@ async def async_step_reconfigure_confirm( ) return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=vol.Schema( { vol.Required(CONF_HOST, default=self.host): str, diff --git a/homeassistant/components/nam/strings.json b/homeassistant/components/nam/strings.json index c4921ec52f96b4..2caa4d8bd976ae 100644 --- a/homeassistant/components/nam/strings.json +++ b/homeassistant/components/nam/strings.json @@ -28,7 +28,7 @@ "confirm_discovery": { "description": "Do you want to set up Nettigo Air Monitor at {host}?" }, - "reconfigure_confirm": { + "reconfigure": { "description": "Update configuration for {device_name}.", "data": { "host": "[%key:common::config_flow::data::host%]" diff --git a/homeassistant/components/pyload/config_flow.py b/homeassistant/components/pyload/config_flow.py index bac0f7953430b7..3e6cbd33bb3802 100644 --- a/homeassistant/components/pyload/config_flow.py +++ b/homeassistant/components/pyload/config_flow.py @@ -193,12 +193,6 @@ async def async_step_reauth_confirm( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Perform a reconfiguration.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle the reconfiguration flow.""" errors = {} @@ -222,7 +216,7 @@ async def async_step_reconfigure_confirm( ) return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=self.add_suggested_values_to_schema( STEP_USER_DATA_SCHEMA, user_input or reconfig_entry.data, diff --git a/homeassistant/components/pyload/strings.json b/homeassistant/components/pyload/strings.json index bbe6989f5e7883..4ae4c4fee6737b 100644 --- a/homeassistant/components/pyload/strings.json +++ b/homeassistant/components/pyload/strings.json @@ -15,7 +15,7 @@ "port": "pyLoad uses port 8000 by default." } }, - "reconfigure_confirm": { + "reconfigure": { "data": { "host": "[%key:common::config_flow::data::host%]", "username": "[%key:common::config_flow::data::username%]", diff --git a/homeassistant/components/shelly/config_flow.py b/homeassistant/components/shelly/config_flow.py index 5ede0bef179c52..717e0923fd6b6b 100644 --- a/homeassistant/components/shelly/config_flow.py +++ b/homeassistant/components/shelly/config_flow.py @@ -399,20 +399,12 @@ async def async_step_reauth_confirm( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle a reconfiguration flow initialized by the user.""" - entry_data = self._get_reconfigure_entry().data - self.host = entry_data[CONF_HOST] - self.port = entry_data.get(CONF_PORT, DEFAULT_HTTP_PORT) - - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" errors = {} reconfigure_entry = self._get_reconfigure_entry() + self.host = reconfigure_entry.data[CONF_HOST] + self.port = reconfigure_entry.data.get(CONF_PORT, DEFAULT_HTTP_PORT) if user_input is not None: host = user_input[CONF_HOST] @@ -433,7 +425,7 @@ async def async_step_reconfigure_confirm( ) return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=vol.Schema( { vol.Required(CONF_HOST, default=self.host): str, diff --git a/homeassistant/components/shelly/strings.json b/homeassistant/components/shelly/strings.json index f76319eb08c5be..342a7418b2a265 100644 --- a/homeassistant/components/shelly/strings.json +++ b/homeassistant/components/shelly/strings.json @@ -28,7 +28,7 @@ "confirm_discovery": { "description": "Do you want to set up the {model} at {host}?\n\nBattery-powered devices that are password protected must be woken up before continuing with setting up.\nBattery-powered devices that are not password protected will be added when the device wakes up, you can now manually wake the device up using a button on it or wait for the next data update from the device." }, - "reconfigure_confirm": { + "reconfigure": { "description": "Update configuration for {device_name}.\n\nBefore setup, battery-powered devices must be woken up, you can now wake the device up using a button on it.", "data": { "host": "[%key:common::config_flow::data::host%]", diff --git a/homeassistant/components/smhi/config_flow.py b/homeassistant/components/smhi/config_flow.py index 6ce7964a1d6846..2992b176f242e3 100644 --- a/homeassistant/components/smhi/config_flow.py +++ b/homeassistant/components/smhi/config_flow.py @@ -82,12 +82,6 @@ async def async_step_user( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle a reconfiguration flow initialized by the user.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" errors: dict[str, str] = {} @@ -132,5 +126,5 @@ async def async_step_reconfigure_confirm( reconfigure_entry.data, ) return self.async_show_form( - step_id="reconfigure_confirm", data_schema=schema, errors=errors + step_id="reconfigure", data_schema=schema, errors=errors ) diff --git a/homeassistant/components/smhi/strings.json b/homeassistant/components/smhi/strings.json index e78fee64a2b021..3d2a790e6b62ca 100644 --- a/homeassistant/components/smhi/strings.json +++ b/homeassistant/components/smhi/strings.json @@ -12,7 +12,7 @@ "longitude": "[%key:common::config_flow::data::longitude%]" } }, - "reconfigure_confirm": { + "reconfigure": { "title": "Reconfigure your location in Sweden", "data": { "latitude": "[%key:common::config_flow::data::latitude%]", diff --git a/homeassistant/components/solarlog/config_flow.py b/homeassistant/components/solarlog/config_flow.py index e90b59865967c9..a61f825aa5e84d 100644 --- a/homeassistant/components/solarlog/config_flow.py +++ b/homeassistant/components/solarlog/config_flow.py @@ -137,12 +137,6 @@ async def async_step_password( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle a reconfiguration flow initialized by the user.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" reconfigure_entry = self._get_reconfigure_entry() @@ -164,7 +158,7 @@ async def async_step_reconfigure_confirm( ) return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=vol.Schema( { vol.Optional( diff --git a/homeassistant/components/solarlog/strings.json b/homeassistant/components/solarlog/strings.json index 89c41194859aca..723af6cb277f98 100644 --- a/homeassistant/components/solarlog/strings.json +++ b/homeassistant/components/solarlog/strings.json @@ -29,7 +29,7 @@ "password": "[%key:common::config_flow::data::password%]" } }, - "reconfigure_confirm": { + "reconfigure": { "title": "Configure SolarLog", "data": { "has_password": "[%key:component::solarlog::config::step::user::data::has_password%]", diff --git a/homeassistant/components/tado/config_flow.py b/homeassistant/components/tado/config_flow.py index c8839b3a919de8..2ab2a86f200d17 100644 --- a/homeassistant/components/tado/config_flow.py +++ b/homeassistant/components/tado/config_flow.py @@ -117,12 +117,6 @@ async def async_step_homekit( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle a reconfiguration flow initialized by the user.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" errors: dict[str, str] = {} @@ -148,7 +142,7 @@ async def async_step_reconfigure_confirm( ) return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=vol.Schema( { vol.Required(CONF_PASSWORD): str, diff --git a/homeassistant/components/tado/strings.json b/homeassistant/components/tado/strings.json index 39453cb5fe1c62..8124570f9c9c9b 100644 --- a/homeassistant/components/tado/strings.json +++ b/homeassistant/components/tado/strings.json @@ -12,7 +12,7 @@ }, "title": "Connect to your Tado account" }, - "reconfigure_confirm": { + "reconfigure": { "title": "Reconfigure your Tado", "description": "Reconfigure the entry, for your account: `{username}`.", "data": { diff --git a/homeassistant/components/vallox/config_flow.py b/homeassistant/components/vallox/config_flow.py index 9a95952ed2557e..30d1d153d9e19a 100644 --- a/homeassistant/components/vallox/config_flow.py +++ b/homeassistant/components/vallox/config_flow.py @@ -84,18 +84,12 @@ async def async_step_user( async def async_step_reconfigure( self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: - """Handle reconfiguration of the Vallox device host address.""" - return await self.async_step_reconfigure_confirm() - - async def async_step_reconfigure_confirm( - self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle reconfiguration of the Vallox device host address.""" reconfigure_entry = self._get_reconfigure_entry() if not user_input: return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=self.add_suggested_values_to_schema( CONFIG_SCHEMA, {CONF_HOST: reconfigure_entry.data.get(CONF_HOST)} ), @@ -123,7 +117,7 @@ async def async_step_reconfigure_confirm( ) return self.async_show_form( - step_id="reconfigure_confirm", + step_id="reconfigure", data_schema=self.add_suggested_values_to_schema( CONFIG_SCHEMA, {CONF_HOST: updated_host} ), diff --git a/homeassistant/components/vallox/strings.json b/homeassistant/components/vallox/strings.json index 608a5eb178222f..8a30ed4ad011ad 100644 --- a/homeassistant/components/vallox/strings.json +++ b/homeassistant/components/vallox/strings.json @@ -9,7 +9,7 @@ "host": "Hostname or IP address of your Vallox device." } }, - "reconfigure_confirm": { + "reconfigure": { "data": { "host": "[%key:common::config_flow::data::host%]" }, diff --git a/tests/components/brother/test_config_flow.py b/tests/components/brother/test_config_flow.py index 0dc179061b4d4c..929e2f083e9216 100644 --- a/tests/components/brother/test_config_flow.py +++ b/tests/components/brother/test_config_flow.py @@ -261,7 +261,7 @@ async def test_reconfigure_successful( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" result = await hass.config_entries.flow.async_configure( result["flow_id"], @@ -297,7 +297,7 @@ async def test_reconfigure_not_successful( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" mock_brother_client.async_update.side_effect = exc @@ -307,7 +307,7 @@ async def test_reconfigure_not_successful( ) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {"base": base_error} mock_brother_client.async_update.side_effect = None @@ -336,7 +336,7 @@ async def test_reconfigure_invalid_hostname( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" result = await hass.config_entries.flow.async_configure( result["flow_id"], @@ -344,7 +344,7 @@ async def test_reconfigure_invalid_hostname( ) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {CONF_HOST: "wrong_host"} @@ -359,7 +359,7 @@ async def test_reconfigure_not_the_same_device( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" mock_brother_client.serial = "9876543210" @@ -369,5 +369,5 @@ async def test_reconfigure_not_the_same_device( ) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {"base": "another_device"} diff --git a/tests/components/enphase_envoy/test_config_flow.py b/tests/components/enphase_envoy/test_config_flow.py index 37dab559bb1b8d..44e2e680d5f59b 100644 --- a/tests/components/enphase_envoy/test_config_flow.py +++ b/tests/components/enphase_envoy/test_config_flow.py @@ -703,7 +703,7 @@ async def test_reconfigure( await setup_integration(hass, config_entry) result = await config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {} # original entry @@ -739,7 +739,7 @@ async def test_reconfigure_nochange( await setup_integration(hass, config_entry) result = await config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {} # original entry @@ -775,7 +775,7 @@ async def test_reconfigure_otherenvoy( await setup_integration(hass, config_entry) result = await config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {} # let mock return different serial from first time, sim it's other one on changed ip @@ -889,7 +889,7 @@ async def test_reconfigure_change_ip_to_existing( result = await config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {} # original entry diff --git a/tests/components/feedreader/test_config_flow.py b/tests/components/feedreader/test_config_flow.py index 29e52c5b01e064..2a434306c0f625 100644 --- a/tests/components/feedreader/test_config_flow.py +++ b/tests/components/feedreader/test_config_flow.py @@ -164,7 +164,7 @@ async def test_reconfigure(hass: HomeAssistant, feedparser) -> None: # init user flow result = await entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" # success with patch( @@ -196,7 +196,7 @@ async def test_reconfigure_errors( # init user flow result = await entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" # raise URLError feedparser.side_effect = urllib.error.URLError("Test") @@ -208,7 +208,7 @@ async def test_reconfigure_errors( }, ) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {"base": "url_error"} # success diff --git a/tests/components/google_travel_time/test_config_flow.py b/tests/components/google_travel_time/test_config_flow.py index 7600c669464137..5f9d5d4549bd53 100644 --- a/tests/components/google_travel_time/test_config_flow.py +++ b/tests/components/google_travel_time/test_config_flow.py @@ -200,7 +200,7 @@ async def test_reconfigure(hass: HomeAssistant, mock_config: MockConfigEntry) -> """Test reconfigure flow.""" reconfigure_result = await mock_config.start_reconfigure_flow(hass) assert reconfigure_result["type"] is FlowResultType.FORM - assert reconfigure_result["step_id"] == "reconfigure_confirm" + assert reconfigure_result["step_id"] == "reconfigure" await assert_common_reconfigure_steps(hass, reconfigure_result) diff --git a/tests/components/homeworks/test_config_flow.py b/tests/components/homeworks/test_config_flow.py index 503b936dc15437..e8c4ab15b3def5 100644 --- a/tests/components/homeworks/test_config_flow.py +++ b/tests/components/homeworks/test_config_flow.py @@ -243,7 +243,7 @@ async def test_reconfigure_flow( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" result = await hass.config_entries.flow.async_configure( result["flow_id"], @@ -308,7 +308,7 @@ async def test_reconfigure_flow_flow_duplicate( result = await entry1.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" result = await hass.config_entries.flow.async_configure( result["flow_id"], @@ -318,7 +318,7 @@ async def test_reconfigure_flow_flow_duplicate( }, ) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {"base": "duplicated_host_port"} @@ -330,7 +330,7 @@ async def test_reconfigure_flow_flow_no_change( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" result = await hass.config_entries.flow.async_configure( result["flow_id"], @@ -375,7 +375,7 @@ async def test_reconfigure_flow_credentials_password_only( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" result = await hass.config_entries.flow.async_configure( result["flow_id"], @@ -386,7 +386,7 @@ async def test_reconfigure_flow_credentials_password_only( }, ) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {"base": "need_username_with_password"} diff --git a/tests/components/lamarzocco/test_config_flow.py b/tests/components/lamarzocco/test_config_flow.py index 7206013de10be8..e4e8d6ebafd4ed 100644 --- a/tests/components/lamarzocco/test_config_flow.py +++ b/tests/components/lamarzocco/test_config_flow.py @@ -271,7 +271,7 @@ async def test_reconfigure_flow( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" result2 = await __do_successful_user_step(hass, result, mock_cloud_client) service_info = get_bluetooth_service_info( diff --git a/tests/components/lcn/test_config_flow.py b/tests/components/lcn/test_config_flow.py index 33b40e15b0cb47..4ef83aeaf8a701 100644 --- a/tests/components/lcn/test_config_flow.py +++ b/tests/components/lcn/test_config_flow.py @@ -206,7 +206,7 @@ async def test_step_reconfigure(hass: HomeAssistant, entry: MockConfigEntry) -> result = await entry.start_reconfigure_flow(hass) assert result["type"] == data_entry_flow.FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" with ( patch("homeassistant.components.lcn.PchkConnectionManager.async_connect"), @@ -244,7 +244,7 @@ async def test_step_reconfigure_error( result = await entry.start_reconfigure_flow(hass) assert result["type"] == data_entry_flow.FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" with patch( "homeassistant.components.lcn.PchkConnectionManager.async_connect", diff --git a/tests/components/madvr/test_config_flow.py b/tests/components/madvr/test_config_flow.py index 42081f3b9b5dfc..7b31ec6c17c5df 100644 --- a/tests/components/madvr/test_config_flow.py +++ b/tests/components/madvr/test_config_flow.py @@ -138,7 +138,7 @@ async def test_reconfigure_flow( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {} # define new host @@ -204,7 +204,7 @@ async def test_reconfigure_flow_errors( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" # Test CannotConnect error mock_madvr_client.open_connection.side_effect = TimeoutError diff --git a/tests/components/mealie/test_config_flow.py b/tests/components/mealie/test_config_flow.py index aee2506b8651a4..15c629ec3da33b 100644 --- a/tests/components/mealie/test_config_flow.py +++ b/tests/components/mealie/test_config_flow.py @@ -244,7 +244,7 @@ async def test_reconfigure_flow( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" result = await hass.config_entries.flow.async_configure( result["flow_id"], @@ -273,7 +273,7 @@ async def test_reconfigure_flow_wrong_account( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" mock_mealie_client.get_user_info.return_value.user_id = "wrong_user_id" @@ -308,7 +308,7 @@ async def test_reconfigure_flow_exceptions( result = await mock_config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" result = await hass.config_entries.flow.async_configure( result["flow_id"], @@ -316,7 +316,7 @@ async def test_reconfigure_flow_exceptions( ) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {"base": error} mock_mealie_client.get_user_info.side_effect = None diff --git a/tests/components/nam/test_config_flow.py b/tests/components/nam/test_config_flow.py index 1d2376945785a9..6c11399c888e39 100644 --- a/tests/components/nam/test_config_flow.py +++ b/tests/components/nam/test_config_flow.py @@ -445,7 +445,7 @@ async def test_reconfigure_successful(hass: HomeAssistant) -> None: result = await entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" with ( patch( @@ -488,7 +488,7 @@ async def test_reconfigure_not_successful(hass: HomeAssistant) -> None: result = await entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" with patch( "homeassistant.components.nam.NettigoAirMonitor.async_check_credentials", @@ -500,7 +500,7 @@ async def test_reconfigure_not_successful(hass: HomeAssistant) -> None: ) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" assert result["errors"] == {"base": "cannot_connect"} with ( @@ -544,7 +544,7 @@ async def test_reconfigure_not_the_same_device(hass: HomeAssistant) -> None: result = await entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" with ( patch( diff --git a/tests/components/pyload/test_config_flow.py b/tests/components/pyload/test_config_flow.py index a3966987ae2862..5ada856d78e6d3 100644 --- a/tests/components/pyload/test_config_flow.py +++ b/tests/components/pyload/test_config_flow.py @@ -250,7 +250,7 @@ async def test_reconfiguration( result = await config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" result = await hass.config_entries.flow.async_configure( result["flow_id"], @@ -285,7 +285,7 @@ async def test_reconfigure_errors( result = await config_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" mock_pyloadapi.login.side_effect = side_effect result = await hass.config_entries.flow.async_configure( diff --git a/tests/components/shelly/test_config_flow.py b/tests/components/shelly/test_config_flow.py index 316f9794471845..93b3a46910c3bb 100644 --- a/tests/components/shelly/test_config_flow.py +++ b/tests/components/shelly/test_config_flow.py @@ -1364,7 +1364,7 @@ async def test_reconfigure_successful( result = await entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" with patch( "homeassistant.components.shelly.config_flow.get_info", @@ -1396,7 +1396,7 @@ async def test_reconfigure_unsuccessful( result = await entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" with patch( "homeassistant.components.shelly.config_flow.get_info", @@ -1433,7 +1433,7 @@ async def test_reconfigure_with_exception( result = await entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" with patch("homeassistant.components.shelly.config_flow.get_info", side_effect=exc): result = await hass.config_entries.flow.async_configure( diff --git a/tests/components/solarlog/test_config_flow.py b/tests/components/solarlog/test_config_flow.py index df5c4bb3c7f0c0..8a34407ff5484d 100644 --- a/tests/components/solarlog/test_config_flow.py +++ b/tests/components/solarlog/test_config_flow.py @@ -207,7 +207,7 @@ async def test_reconfigure_flow( result = await entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" # test with all data provided result = await hass.config_entries.flow.async_configure( diff --git a/tests/components/vallox/conftest.py b/tests/components/vallox/conftest.py index 590dbc8de4b5f6..b652940930088d 100644 --- a/tests/components/vallox/conftest.py +++ b/tests/components/vallox/conftest.py @@ -81,7 +81,7 @@ async def init_reconfigure_flow( result = await mock_entry.start_reconfigure_flow(hass) assert result["type"] is FlowResultType.FORM - assert result["step_id"] == "reconfigure_confirm" + assert result["step_id"] == "reconfigure" # original entry assert mock_entry.data["host"] == "192.168.100.50"