mirror of
https://github.com/esphome/esphome.git
synced 2025-09-26 07:02:21 +01:00
Add validate to components (#1631)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
482a3aebc9
commit
c79d700d03
@@ -34,7 +34,7 @@ CHIPSETS = [
|
||||
]
|
||||
|
||||
|
||||
def validate(value):
|
||||
def _validate(value):
|
||||
if value[CONF_CHIPSET] == "NEOPIXEL" and CONF_RGB_ORDER in value:
|
||||
raise cv.Invalid("NEOPIXEL doesn't support RGB order")
|
||||
return value
|
||||
@@ -47,7 +47,7 @@ CONFIG_SCHEMA = cv.All(
|
||||
cv.Required(CONF_PIN): pins.output_pin,
|
||||
}
|
||||
),
|
||||
validate,
|
||||
_validate,
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user