mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Use username as config entry title in Sensibo (#134488)
This commit is contained in:
parent
a7af042e57
commit
836354bb99
@ -13,7 +13,7 @@ from homeassistant.const import CONF_API_KEY
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.selector import TextSelector
|
||||
|
||||
from .const import DEFAULT_NAME, DOMAIN
|
||||
from .const import DOMAIN
|
||||
from .util import NoDevicesError, NoUsernameError, async_validate_api
|
||||
|
||||
DATA_SCHEMA = vol.Schema(
|
||||
@ -126,7 +126,7 @@ class SensiboConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
self._abort_if_unique_id_configured()
|
||||
|
||||
return self.async_create_entry(
|
||||
title=DEFAULT_NAME,
|
||||
title=username,
|
||||
data={CONF_API_KEY: api_key},
|
||||
)
|
||||
|
||||
|
@ -116,7 +116,7 @@ async def test_flow_fails(
|
||||
)
|
||||
|
||||
assert result3["type"] is FlowResultType.CREATE_ENTRY
|
||||
assert result3["title"] == "Sensibo"
|
||||
assert result3["title"] == "username"
|
||||
assert result3["data"] == {
|
||||
"api_key": "1234567891",
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user