mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Improve config entry title for GIOS integration (#52583)
* Improve GIOS config entry title * Usonly station name as title
This commit is contained in:
parent
b645560633
commit
dc72c6c606
@ -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):
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user