Added config validator for future group platforms (#12592)
* Added cv.EntitiesDoamin(domain) validator * Check if all entities in string or list belong to domain * Added tests * Use factory function and entity_ids * Different error message * Typo * Added entity_domain validator for a single entity_id * Image_processing platform now uses cv.entity_domain for source validation
This commit is contained in:
1 parent
7d5c1581f1
commit
6e6ae173fd
3 files changed
+75
-2
No files matched your search
@@ -43,7 +43,7 @@ DEFAULT_TIMEOUT = 10
|
||||
DEFAULT_CONFIDENCE = 80
|
||||
|
||||
SOURCE_SCHEMA = vol.Schema({
|
||||
vol.Required(CONF_ENTITY_ID): cv.entity_id,
|
||||
vol.Required(CONF_ENTITY_ID): cv.entity_domain('camera'),
|
||||
vol.Optional(CONF_NAME): cv.string,
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user