The best way I know to illiwstrate how to install a T&P line on a water heater is to show one that is not installed correctly.
There are two problems with this instation. First the termination point is more than 6 " above the floor. The second is that it is not a smooth pipe. The t&p line must slope down continuously to the termination point. It is preferable to make the termination point outside where it can't damage baseboard or drywall.
For all your Arizona House Plans and Phoenix Home Inspection needs contact me.
602-326-4061

air conditioner requires a p-trap. The p-trap stays wet all the time. The water in the p-trap keeps any contaminants in the attic air from entering the system and getting blown into the house. The vent allows any contaminants in the line to escape. It is important to install the vent after the p-trap. Contractors may tell you that the vent is before the p-rap so that the home owner can pour some bleach in it periodically to keep the line flowing freely. That is fine to do as long as the vent has a cap on it and there is an open vent on the other side of the p-trap. The vent in the picture will allow the air blowing across the coils to blow into the attic and waste energy.
Now is a good time to check out your unit or any other damage that was caused by the rain storms.