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:
Otto Winter 2019-01-19 16:53:54 +01:00 committed by GitHub
parent a00fe09c66
commit c86675f644
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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),
})), })),
}) })