mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
Language schema 202204 (#3492)
This commit is contained in:
committed by
GitHub
parent
29d6d0a906
commit
f002a23d2d
@@ -1,4 +1,4 @@
|
||||
from esphome.jsonschema import jschema_extractor
|
||||
from esphome.schema_extractors import SCHEMA_EXTRACT, schema_extractor
|
||||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome import automation
|
||||
@@ -479,11 +479,11 @@ async def addressable_flicker_effect_to_code(config, effect_id):
|
||||
|
||||
|
||||
def validate_effects(allowed_effects):
|
||||
@jschema_extractor("effects")
|
||||
@schema_extractor("effects")
|
||||
def validator(value):
|
||||
# pylint: disable=comparison-with-callable
|
||||
if value == jschema_extractor:
|
||||
if value == SCHEMA_EXTRACT:
|
||||
return (allowed_effects, EFFECTS_REGISTRY)
|
||||
|
||||
value = cv.validate_registry("effect", EFFECTS_REGISTRY)(value)
|
||||
errors = []
|
||||
names = set()
|
||||
|
||||
Reference in New Issue
Block a user