Remove unreachable template validation for imap config flow (#94862)
This commit is contained in:
parent
ce8217acf5
commit
8b6d2fc3ce
2 changed files with 1 additions and 9 deletions
|
@ -19,7 +19,6 @@ from homeassistant.const import (
|
|||
)
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.data_entry_flow import AbortFlow, FlowResult
|
||||
from homeassistant.exceptions import TemplateError
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.selector import (
|
||||
BooleanSelector,
|
||||
|
@ -29,7 +28,6 @@ from homeassistant.helpers.selector import (
|
|||
TemplateSelector,
|
||||
TemplateSelectorConfig,
|
||||
)
|
||||
from homeassistant.helpers.template import Template
|
||||
from homeassistant.util.ssl import SSLCipherList
|
||||
|
||||
from .const import (
|
||||
|
@ -122,11 +120,6 @@ async def validate_input(
|
|||
errors[CONF_CHARSET] = "invalid_charset"
|
||||
else:
|
||||
errors[CONF_SEARCH] = "invalid_search"
|
||||
if template := user_input.get(CONF_CUSTOM_EVENT_DATA_TEMPLATE):
|
||||
try:
|
||||
Template(template, hass=hass).ensure_valid()
|
||||
except TemplateError:
|
||||
errors[CONF_CUSTOM_EVENT_DATA_TEMPLATE] = "invalid_template"
|
||||
|
||||
return errors
|
||||
|
||||
|
|
|
@ -52,8 +52,7 @@
|
|||
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
|
||||
"invalid_charset": "[%key:component::imap::config::error::invalid_charset%]",
|
||||
"invalid_folder": "[%key:component::imap::config::error::invalid_folder%]",
|
||||
"invalid_search": "[%key:component::imap::config::error::invalid_search%]",
|
||||
"invalid_template": "Invalid template"
|
||||
"invalid_search": "[%key:component::imap::config::error::invalid_search%]"
|
||||
}
|
||||
},
|
||||
"selector": {
|
||||
|
|
Loading…
Add table
Reference in a new issue