Date: 201205
Local time of day: 1801-2400
Location: ZZZ.Airport, US
Flight conditions: VMC
Aircraft: EMB ERJ 190/195 ER/LR
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Flight phase: Initial Climb
Airspace: Class C ZZZ
Aircraft component: Pneumatic System
Component problem: Malfunctioning
Reporter organization: Air Carrier
Reporter function: First Officer; Pilot Flying
Reporter qualification: Flight Crew Commercial
Human factors: Communication Breakdown
Anomaly: Aircraft Equipment Problem Critical; Deviation / Discrepancy - Procedural Maintenance; Deviation / Discrepancy - Procedural Published Material / Policy; Deviation / Discrepancy - Procedural MEL / CDL
Detector: Person Flight Crew; Person Maintenance
When detected: In-flight
Result: Flight Crew Diverted; General Maintenance Action
Contributing factors: Human Factors; Company Policy; Aircraft; Staffing; Procedure
Primary problem: Staffing

Narrative: The inbound crew wrote up a Bleed two leak. We waited about 1.5 hours for Maintenance to show up; but then they didn't have the right tools. After about five hours of a delay; we boarded and pushed back.Start #2 engine; hot start; abort; QRH; dry motor; etc. Again we attempted #2 engine start; and again hot start. A little fishy since Contract Maintenance was just working on that engine's bleed system. Called Maintenance Control; returned to gate; and deplaned.Called Contract Maintenance back. It takes them about 45 minutes to return (as it is after normal business hours now). They said that Maintenance Control didn't specify which valves to close; so they did more than one. Anyway; they reversed what they did and did some other maintenance stuff and we started the engine at the gate and it seemed ok; so then we re-boarded about fifty angry passengers and headed out. #2 engine starts normally this time.We depart the rather short runway and no sooner do we get the wheels in the wells; that the EICAS lights up with multiple messages; with the most concerning being Bleed two Overpressure (showed about 130 PSI on synoptic page). Also; got Bleed 2 fail (which was concerning; because per the MEL it was already off and supposedly isolated). Headed to the south; I flew; Captain ran the QRH. Leveled off and told ATC. Finished the procedure and at this time we are only about 45 miles north of ZZZ; so we decided to divert to for the longer runways; better crash/fire rescue; and Maintenance with more airline experience. Landed at ZZZ [and it] takes 30 minutes to determine what gate we are headed for; as Company had no heads up that we were coming. Got to gate; deplaned; and called Maintenance.Contract MX came out and; lucky for us; they work on [another Air Carrier] and are well versed on the E190. They took a look and noted that the Maintenance procedure done in ZZZ1 was done incorrectly. Later; the ZZZ Maintenance wrote in the Logbook; 'Inspection and found bleed valve to be in incorrect configuration to comply with MEL 36-21-00-2.'When we left the ramp in ZZZ1 we had no open write ups; had the MEL noted; and the logbook signed off. We were not aware of any maintenance discrepancy until we rotated and got the EICAS messages concerning Bleed Fail and Over-pressure. We were not aware of the improper maintenance until we had diverted to ZZZ and talked to the mechanics there.This event is difficult to classify. It is; at the very least; a plea to the Company and the FAA to look into this Contract Maintenance Company that we use in ZZZ1. I started to feel concerned when the Mechanic got on the aircraft; and it took him five minutes to find the air conditioning panel. They didn't have the right tools for our aircraft. Later they came up to the cockpit at were searching for some 'toolbox' in there; and then wanted to look behind the aft galley carts and wheelchair for this mysterious toolbox. They had the engine cowling open for an hour before they could locate the 'valve' on which they needed to work on. The main point is that we learned after the fact; that they did improper maintenance work on our aircraft twice in one day.




Synopsis: An E-190 First Officer believed incompetent and/or improperly trained contract maintenance personal failed; in two separate attempts; to properly comply with MEL requirements to defer a pneumatic bleed valve problem which had been reported on the inbound flight.