mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 21:44:55 +01:00
Fix custom output requiring type (#344)
* Fix custom output requiring type
Fixes #343
* Revert "Fix custom output requiring type"
This reverts commit 37f995d32a
.
* Fix
This commit is contained in:
parent
a00fe09c66
commit
c86675f644
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,7 @@ CustomFloatOutputConstructor = output.output_ns.class_('CustomFloatOutputConstru
|
||||||
BINARY_SCHEMA = output.PLATFORM_SCHEMA.extend({
|
BINARY_SCHEMA = output.PLATFORM_SCHEMA.extend({
|
||||||
cv.GenerateID(): cv.declare_variable_id(CustomBinaryOutputConstructor),
|
cv.GenerateID(): cv.declare_variable_id(CustomBinaryOutputConstructor),
|
||||||
vol.Required(CONF_LAMBDA): cv.lambda_,
|
vol.Required(CONF_LAMBDA): cv.lambda_,
|
||||||
|
vol.Required(CONF_TYPE): 'binary',
|
||||||
vol.Required(CONF_OUTPUTS):
|
vol.Required(CONF_OUTPUTS):
|
||||||
cv.ensure_list(output.BINARY_OUTPUT_SCHEMA.extend({
|
cv.ensure_list(output.BINARY_OUTPUT_SCHEMA.extend({
|
||||||
cv.GenerateID(): cv.declare_variable_id(output.BinaryOutput),
|
cv.GenerateID(): cv.declare_variable_id(output.BinaryOutput),
|
||||||
|
@ -21,8 +22,9 @@ BINARY_SCHEMA = output.PLATFORM_SCHEMA.extend({
|
||||||
FLOAT_SCHEMA = output.PLATFORM_SCHEMA.extend({
|
FLOAT_SCHEMA = output.PLATFORM_SCHEMA.extend({
|
||||||
cv.GenerateID(): cv.declare_variable_id(CustomFloatOutputConstructor),
|
cv.GenerateID(): cv.declare_variable_id(CustomFloatOutputConstructor),
|
||||||
vol.Required(CONF_LAMBDA): cv.lambda_,
|
vol.Required(CONF_LAMBDA): cv.lambda_,
|
||||||
|
vol.Required(CONF_TYPE): 'float',
|
||||||
vol.Required(CONF_OUTPUTS):
|
vol.Required(CONF_OUTPUTS):
|
||||||
cv.ensure_list(output.FLOAT_OUTPUT_PLATFORM_SCHEMA.extend({
|
cv.ensure_list(output.FLOAT_OUTPUT_SCHEMA.extend({
|
||||||
cv.GenerateID(): cv.declare_variable_id(output.FloatOutput),
|
cv.GenerateID(): cv.declare_variable_id(output.FloatOutput),
|
||||||
})),
|
})),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue