diff --git a/esphomeyaml/config.py b/esphomeyaml/config.py index 629ce0794d..4a3bc68fee 100644 --- a/esphomeyaml/config.py +++ b/esphomeyaml/config.py @@ -175,7 +175,7 @@ def validate_config(config): dependencies = getattr(component, 'DEPENDENCIES', []) for dependency in dependencies: if dependency not in _ALL_COMPONENTS: - result.add_error(u"Component {} requires {}".format(domain, dependency)) + result.add_error(u"Component {} requires component {}".format(domain, dependency)) success = False if not success: continue @@ -209,8 +209,8 @@ def validate_config(config): dependencies = getattr(platform, 'DEPENDENCIES', []) for dependency in dependencies: if dependency not in _ALL_COMPONENTS: - result.add_error(u"Platform {}.{} requires {}".format(domain, p_name, - dependency)) + result.add_error(u"Platform {}.{} requires component {}".format(domain, p_name, + dependency)) success = False if not success: continue diff --git a/esphomeyaml/pins.py b/esphomeyaml/pins.py index 38bb97a9f6..0521de44c7 100644 --- a/esphomeyaml/pins.py +++ b/esphomeyaml/pins.py @@ -205,12 +205,12 @@ def shorthand_input_pin(value): PCF8574_OUTPUT_PIN_SCHEMA = vol.Schema({ vol.Required(CONF_PCF8574): cv.use_variable_id(pcf8574.PCF8574Component), vol.Required(CONF_NUMBER): vol.Coerce(int), - vol.Optional(CONF_MODE): vol.All(vol.Upper, "OUTPUT"), + vol.Optional(CONF_MODE): vol.All(vol.Upper, cv.one_of("OUTPUT")), vol.Optional(CONF_INVERTED, default=False): cv.boolean, }) PCF8574_INPUT_PIN_SCHEMA = PCF8574_OUTPUT_PIN_SCHEMA.extend({ - vol.Optional(CONF_MODE): vol.All(vol.Upper, vol.Any("INPUT", "INPUT_PULLUP")), + vol.Optional(CONF_MODE): vol.All(vol.Upper, cv.one_of("INPUT", "INPUT_PULLUP")), })