Simplify validator

This commit is contained in:
Otto Winter 2019-01-06 09:47:14 +01:00
parent e72ef9e061
commit 30bd74cb6c
No known key found for this signature in database
GPG key ID: DB66C0BE6013F97E

View file

@ -27,7 +27,7 @@ MODELS = {
'SH1106_64X48': SSD1306Model.SH1106_MODEL_64_48, 'SH1106_64X48': SSD1306Model.SH1106_MODEL_64_48,
} }
SSD1306_MODEL = vol.All(vol.Replace(' ', '_'), cv.one_of(*MODELS, upper=True)) SSD1306_MODEL = cv.one_of(*MODELS, upper=True, space="_")
PLATFORM_SCHEMA = display.FULL_DISPLAY_PLATFORM_SCHEMA.extend({ PLATFORM_SCHEMA = display.FULL_DISPLAY_PLATFORM_SCHEMA.extend({
cv.GenerateID(): cv.declare_variable_id(SPISSD1306), cv.GenerateID(): cv.declare_variable_id(SPISSD1306),