Improve validation of device trigger config (#26910)
* Improve validation of device trigger config * Remove action and condition checks * Move config validation to own file * Fix tests * Fixes * Fixes * Small tweak
This commit is contained in:
parent
588bc26661
commit
e57e7e8449
11 changed files with 210 additions and 31 deletions
|
@ -90,7 +90,7 @@ def has_at_least_one_key(*keys: str) -> Callable:
|
|||
for k in obj.keys():
|
||||
if k in keys:
|
||||
return obj
|
||||
raise vol.Invalid("must contain one of {}.".format(", ".join(keys)))
|
||||
raise vol.Invalid("must contain at least one of {}.".format(", ".join(keys)))
|
||||
|
||||
return validate
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue