mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Add automation config validation
* Add automation config validation * Remove unnecessary dict validator * Downgrade voluptuous to 0.8.9 * Fix linting * Address issues
This commit is contained in:
@@ -16,6 +16,7 @@ import os
|
||||
import pkgutil
|
||||
import sys
|
||||
|
||||
from homeassistant.const import PLATFORM_FORMAT
|
||||
from homeassistant.util import OrderedSet
|
||||
|
||||
PREPARED = False
|
||||
@@ -77,6 +78,11 @@ def set_component(comp_name, component):
|
||||
_COMPONENT_CACHE[comp_name] = component
|
||||
|
||||
|
||||
def get_platform(domain, platform):
|
||||
"""Try to load specified platform."""
|
||||
return get_component(PLATFORM_FORMAT.format(domain, platform))
|
||||
|
||||
|
||||
def get_component(comp_name):
|
||||
"""Try to load specified component.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user