Fix custom output requiring type

Fixes #343
This commit is contained in:
Otto Winter 2019-01-15 20:11:50 +01:00
parent 54dd9e94ab
commit 37f995d32a
No known key found for this signature in database
GPG key ID: DB66C0BE6013F97E

View file

@ -33,8 +33,7 @@ def validate_custom_output(value):
raise vol.Invalid("Value must be dict")
if CONF_TYPE not in value:
raise vol.Invalid("type not specified!")
type = cv.string_strict(value[CONF_TYPE]).lower()
value[CONF_TYPE] = type
type = cv.string_strict(value.pop(CONF_TYPE)).lower()
if type == 'binary':
return BINARY_SCHEMA(value)
if type == 'float':