diff --git a/homeassistant/components/gios/config_flow.py b/homeassistant/components/gios/config_flow.py index 161dc1b0add..b8a52254c32 100644 --- a/homeassistant/components/gios/config_flow.py +++ b/homeassistant/components/gios/config_flow.py @@ -49,7 +49,7 @@ class GiosFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): await gios.async_update() return self.async_create_entry( - title=user_input[CONF_STATION_ID], + title=gios.station_name, data=user_input, ) except (ApiError, ClientConnectorError, asyncio.TimeoutError): diff --git a/tests/components/gios/test_config_flow.py b/tests/components/gios/test_config_flow.py index 6b1f829c4d8..21fc9d8bfda 100644 --- a/tests/components/gios/test_config_flow.py +++ b/tests/components/gios/test_config_flow.py @@ -99,7 +99,7 @@ async def test_create_entry(hass): result = await flow.async_step_user(user_input=CONFIG) assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY - assert result["title"] == CONFIG[CONF_STATION_ID] + assert result["title"] == "Test Name 1" assert result["data"][CONF_STATION_ID] == CONFIG[CONF_STATION_ID] assert flow.context["unique_id"] == "123"