mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Differentiate File integration entries by prefixing the title with the platform instead (#131016)
Differentiate File integration entries by prefixes the title with the platform
This commit is contained in:
parent
935bf3fb11
commit
b124ebeb1f
@ -32,7 +32,7 @@ from homeassistant.helpers.selector import (
|
|||||||
TextSelectorType,
|
TextSelectorType,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .const import CONF_TIMESTAMP, DEFAULT_NAME, DOMAIN
|
from .const import CONF_TIMESTAMP, DOMAIN
|
||||||
|
|
||||||
BOOLEAN_SELECTOR = BooleanSelector(BooleanSelectorConfig())
|
BOOLEAN_SELECTOR = BooleanSelector(BooleanSelectorConfig())
|
||||||
TEMPLATE_SELECTOR = TemplateSelector(TemplateSelectorConfig())
|
TEMPLATE_SELECTOR = TemplateSelector(TemplateSelectorConfig())
|
||||||
@ -105,7 +105,7 @@ class FileConfigFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
if not await self.validate_file_path(user_input[CONF_FILE_PATH]):
|
if not await self.validate_file_path(user_input[CONF_FILE_PATH]):
|
||||||
errors[CONF_FILE_PATH] = "not_allowed"
|
errors[CONF_FILE_PATH] = "not_allowed"
|
||||||
else:
|
else:
|
||||||
title = f"{DEFAULT_NAME} [{user_input[CONF_FILE_PATH]}]"
|
title = f"{platform.capitalize()} [{user_input[CONF_FILE_PATH]}]"
|
||||||
data = deepcopy(user_input)
|
data = deepcopy(user_input)
|
||||||
options = {}
|
options = {}
|
||||||
for key, value in user_input.items():
|
for key, value in user_input.items():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user