mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	fix: update CONFIG_SCHEMA to simplify available_outputs validation by removing voluptuous
This commit is contained in:
		| @@ -1,5 +1,3 @@ | ||||
| import voluptuous as vol | ||||
|  | ||||
| import esphome.codegen as cg  # noqa: I001 | ||||
| from esphome.components import output | ||||
| import esphome.config_validation as cv | ||||
| @@ -12,7 +10,7 @@ CONF_SAVE_MODE = 'save_mode' | ||||
| CONF_AVAILABLE_OUTPUTS = 'available_outputs' | ||||
| CONFIG_SCHEMA = cv.Schema({ | ||||
|     cv.GenerateID(): cv.declare_id(DynamicLamp), | ||||
|     cv.Required(CONF_AVAILABLE_OUTPUTS): vol.All(cv.ensure_list, [cv.use_id(output.FloatOutput)]), | ||||
|     cv.Required(CONF_AVAILABLE_OUTPUTS): [cv.use_id(output.FloatOutput)], | ||||
|     cv.Optional(CONF_SAVE_MODE, default=0): cv.int_range(0, 1), | ||||
| }).extend(cv.COMPONENT_SCHEMA) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user