diff --git a/homeassistant/components/unifi/config_flow.py b/homeassistant/components/unifi/config_flow.py index a64c6fcef5f..8f90e13c9fa 100644 --- a/homeassistant/components/unifi/config_flow.py +++ b/homeassistant/components/unifi/config_flow.py @@ -299,6 +299,7 @@ class UnifiOptionsFlowHandler(config_entries.OptionsFlow): ): cv.multi_select(clients_to_block), } ), + last_step=True, ) async def async_step_device_tracker(self, user_input=None): @@ -354,6 +355,7 @@ class UnifiOptionsFlowHandler(config_entries.OptionsFlow): ): bool, } ), + last_step=False, ) async def async_step_client_control(self, user_input=None): @@ -391,6 +393,7 @@ class UnifiOptionsFlowHandler(config_entries.OptionsFlow): } ), errors=errors, + last_step=False, ) async def async_step_statistics_sensors(self, user_input=None): @@ -413,6 +416,7 @@ class UnifiOptionsFlowHandler(config_entries.OptionsFlow): ): bool, } ), + last_step=True, ) async def _update_options(self): diff --git a/tests/components/unifi/test_config_flow.py b/tests/components/unifi/test_config_flow.py index 1967369e22b..8f88b6adb4c 100644 --- a/tests/components/unifi/test_config_flow.py +++ b/tests/components/unifi/test_config_flow.py @@ -448,6 +448,7 @@ async def test_advanced_option_flow(hass, aioclient_mock): assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["step_id"] == "device_tracker" + assert not result["last_step"] assert set( result["data_schema"].schema[CONF_SSID_FILTER].options.keys() ).intersection(("SSID 1", "SSID 2", "SSID 2_IOT", "SSID 3")) @@ -465,6 +466,7 @@ async def test_advanced_option_flow(hass, aioclient_mock): assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["step_id"] == "client_control" + assert not result["last_step"] result = await hass.config_entries.options.async_configure( result["flow_id"], @@ -477,6 +479,7 @@ async def test_advanced_option_flow(hass, aioclient_mock): assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["step_id"] == "statistics_sensors" + assert result["last_step"] result = await hass.config_entries.options.async_configure( result["flow_id"], @@ -519,6 +522,7 @@ async def test_simple_option_flow(hass, aioclient_mock): assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["step_id"] == "simple_options" + assert result["last_step"] result = await hass.config_entries.options.async_configure( result["flow_id"],