mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Improve error messages
This commit is contained in:
		| @@ -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,7 +209,7 @@ 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, | ||||
|                     result.add_error(u"Platform {}.{} requires component {}".format(domain, p_name, | ||||
|                                                                                     dependency)) | ||||
|                     success = False | ||||
|             if not success: | ||||
|   | ||||
| @@ -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")), | ||||
| }) | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user