Warn if config invalid shape for script
This commit is contained in:
1 parent
d4f0f0ffd3
commit
2861bbb02c
2 files changed
+17
-16
No files matched your search
@@ -76,8 +76,9 @@ def setup(hass, config):
|
||||
_LOGGER.warn("Found invalid key for script: %s. Use %s instead.",
|
||||
object_id, slugify(object_id))
|
||||
continue
|
||||
if not cfg.get(CONF_SEQUENCE):
|
||||
_LOGGER.warn("Missing key 'sequence' for script %s", object_id)
|
||||
if not isinstance(cfg.get(CONF_SEQUENCE), list):
|
||||
_LOGGER.warn("Key 'sequence' for script %s should be a list",
|
||||
object_id)
|
||||
continue
|
||||
alias = cfg.get(CONF_ALIAS, object_id)
|
||||
script = Script(hass, object_id, alias, cfg[CONF_SEQUENCE])
|
||||
|
||||
Reference in new issue
Block a user