Use username as config entry title in Sensibo (#134488)

This commit is contained in:
G Johansson 2025-01-02 21:18:19 +01:00 committed by GitHub
parent a7af042e57
commit 836354bb99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -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},
)

View File

@ -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",
}