mirror of
https://github.com/esphome/esphome.git
synced 2025-09-26 23:22:21 +01:00
fix: update CONFIG_SCHEMA to ensure available_outputs use FloatOutput IDs
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import esphome.codegen as cg
|
||||
import esphome.codegen as cg # noqa: I001
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import output
|
||||
from esphome.const import CONF_ID
|
||||
|
||||
dynamic_lamp_ns = cg.esphome_ns.namespace('dynamic_lamp')
|
||||
@@ -9,7 +10,7 @@ CONF_SAVE_MODE = 'save_mode'
|
||||
CONF_AVAILABLE_OUTPUTS = 'available_outputs'
|
||||
CONFIG_SCHEMA = cv.Schema({
|
||||
cv.GenerateID(): cv.declare_id(DynamicLamp),
|
||||
cv.Required(CONF_AVAILABLE_OUTPUTS): cv.ensure_list(cv.string),
|
||||
cv.Required(CONF_AVAILABLE_OUTPUTS): cv.All(cv.ensure_list, [cv.use_id(output.FloatOutput)]),
|
||||
cv.Optional(CONF_SAVE_MODE, default=0): cv.int_range(0, 1),
|
||||
}).extend(cv.COMPONENT_SCHEMA)
|
||||
|
||||
|
Reference in New Issue
Block a user