mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
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:
@@ -3,6 +3,7 @@ from collections import OrderedDict
|
||||
import uuid
|
||||
|
||||
from homeassistant.components.automation import DOMAIN, PLATFORM_SCHEMA
|
||||
from homeassistant.components.automation.config import async_validate_config_item
|
||||
from homeassistant.const import CONF_ID, SERVICE_RELOAD
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
@@ -26,6 +27,7 @@ async def async_setup(hass):
|
||||
cv.string,
|
||||
PLATFORM_SCHEMA,
|
||||
post_write_hook=hook,
|
||||
data_validator=async_validate_config_item,
|
||||
)
|
||||
)
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user