diff --git a/homeassistant/components/vodafone_station/config_flow.py b/homeassistant/components/vodafone_station/config_flow.py index 6641f5f5711..c21796d4064 100644 --- a/homeassistant/components/vodafone_station/config_flow.py +++ b/homeassistant/components/vodafone_station/config_flow.py @@ -156,8 +156,6 @@ class VodafoneStationConfigFlow(ConfigFlow, domain=DOMAIN): errors: dict[str, str] = {} - errors = {} - try: await validate_input(self.hass, user_input) except aiovodafone_exceptions.AlreadyLogged: diff --git a/tests/components/vodafone_station/test_config_flow.py b/tests/components/vodafone_station/test_config_flow.py index 0648987eb27..7ab56f2e967 100644 --- a/tests/components/vodafone_station/test_config_flow.py +++ b/tests/components/vodafone_station/test_config_flow.py @@ -246,12 +246,14 @@ async def test_reconfigure_successful( # original entry assert mock_config_entry.data["host"] == "fake_host" + new_host = "192.168.100.60" + reconfigure_result = await hass.config_entries.flow.async_configure( result["flow_id"], - { - "host": "192.168.100.60", - "password": "fake_password", - "username": "fake_username", + user_input={ + CONF_HOST: new_host, + CONF_PASSWORD: "fake_password", + CONF_USERNAME: "fake_username", }, ) @@ -259,7 +261,7 @@ async def test_reconfigure_successful( assert reconfigure_result["reason"] == "reconfigure_successful" # changed entry - assert mock_config_entry.data["host"] == "192.168.100.60" + assert mock_config_entry.data["host"] == new_host @pytest.mark.parametrize( @@ -290,10 +292,10 @@ async def test_reconfigure_fails( reconfigure_result = await hass.config_entries.flow.async_configure( result["flow_id"], - { - "host": "192.168.100.60", - "password": "fake_password", - "username": "fake_username", + user_input={ + CONF_HOST: "192.168.100.60", + CONF_PASSWORD: "fake_password", + CONF_USERNAME: "fake_username", }, )