mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Add support for selectors in services.yaml (#43162)
* Add support for selectors in services.yaml * Add base schema validation
This commit is contained in:
@ -6,8 +6,9 @@ from typing import Dict
|
||||
import voluptuous as vol
|
||||
from voluptuous.humanize import humanize_error
|
||||
|
||||
from homeassistant.const import CONF_SELECTOR
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers import config_validation as cv, selector
|
||||
from homeassistant.util.yaml import load_yaml
|
||||
|
||||
from .model import Integration
|
||||
@ -27,6 +28,7 @@ FIELD_SCHEMA = vol.Schema(
|
||||
vol.Optional("default"): exists,
|
||||
vol.Optional("values"): exists,
|
||||
vol.Optional("required"): bool,
|
||||
vol.Optional(CONF_SELECTOR): selector.validate_selector,
|
||||
}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user