diff --git a/homeassistant/components/jewish_calendar/config_flow.py b/homeassistant/components/jewish_calendar/config_flow.py index 67223324ae9ee26d2466f3880fd321bfe0023dba..f96699d01bd73f99f8bb7b7c3447cc78106e1fee 100644 --- a/homeassistant/components/jewish_calendar/config_flow.py +++ b/homeassistant/components/jewish_calendar/config_flow.py @@ -87,7 +87,6 @@ class JewishCalendarConfigFlow(ConfigFlow, domain=DOMAIN): """Handle a config flow for Jewish calendar.""" VERSION = 1 - _config_entry: ConfigEntry @staticmethod @callback @@ -133,25 +132,17 @@ class JewishCalendarConfigFlow(ConfigFlow, domain=DOMAIN): self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" - self._config_entry = self._get_reconfigure_entry() - 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() if not user_input: return self.async_show_form( data_schema=self.add_suggested_values_to_schema( _get_data_schema(self.hass), - {**self._config_entry.data}, + reconfigure_entry.data, ), - step_id="reconfigure_confirm", + step_id="reconfigure", ) - return self.async_update_reload_and_abort( - self._config_entry, data=user_input, reason="reconfigure_successful" - ) + return self.async_update_reload_and_abort(reconfigure_entry, data=user_input) class JewishCalendarOptionsFlowHandler(OptionsFlowWithConfigEntry): diff --git a/tests/components/jewish_calendar/test_config_flow.py b/tests/components/jewish_calendar/test_config_flow.py index 1468a66efbb7e9d2c1e2ea2319c0b02d85ccbecf..fe31e7b6002e4953dce7ef5a544848a6ebd935d4 100644 --- a/tests/components/jewish_calendar/test_config_flow.py +++ b/tests/components/jewish_calendar/test_config_flow.py @@ -177,7 +177,7 @@ async def test_reconfigure( # init user 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" # success result = await hass.config_entries.flow.async_configure(