Config Validator: schema_with_slug_keys (#20298)
* schema_with_slug_keys * Update config_validation.py * Update config_validation.py
This commit is contained in:
1 parent
4b3cdb9f4e
commit
6511e11ec9
38 files changed
+66
-66
No files matched your search
@@ -64,14 +64,15 @@ def _cv_input_select(cfg):
|
||||
|
||||
|
||||
CONFIG_SCHEMA = vol.Schema({
|
||||
DOMAIN: vol.Schema({
|
||||
cv.slug: vol.All({
|
||||
DOMAIN: cv.schema_with_slug_keys(
|
||||
vol.All({
|
||||
vol.Optional(CONF_NAME): cv.string,
|
||||
vol.Required(CONF_OPTIONS):
|
||||
vol.All(cv.ensure_list, vol.Length(min=1), [cv.string]),
|
||||
vol.Optional(CONF_INITIAL): cv.string,
|
||||
vol.Optional(CONF_ICON): cv.icon,
|
||||
}, _cv_input_select)})
|
||||
}, _cv_input_select)
|
||||
)
|
||||
}, required=True, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user