mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	preen
This commit is contained in:
		| @@ -496,12 +496,14 @@ async def to_code(config: ConfigType) -> None: | ||||
|         cg.add(cg.App.register_area(area_var)) | ||||
|  | ||||
|     # Process devices and areas | ||||
|     devices: dict[str, str] | None | ||||
|     if devices := config.get(CONF_DEVICES): | ||||
|         # Reserve space for devices | ||||
|         cg.add(cg.RawStatement(f"App.reserve_device({len(devices)});")) | ||||
|         cg.add_define("USE_DEVICES") | ||||
|  | ||||
|         # Process additional areas | ||||
|         areas: dict[str, str] | None | ||||
|         if areas := config.get(CONF_AREAS): | ||||
|             for area_conf in areas: | ||||
|                 area = cg.new_Pvariable(area_conf[CONF_ID]) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user