This invention relates to a valve for mounting on a housing (5) of an electrochemical device and for venting and venting the housing (5). The valve includes a
flange (1) mounted on the housing (5), the
flange (1) having a central axis C and forming a central gas passage (1.1). The central gas passage (1.1) preferably extends along the central axis C over the entire length of the
flange (1). The valve also includes a valve body (2) disposed in the gas passage (1.1), the valve body (2) being preloaded by means of at least one elastic element (2.3) positioned on top of the valve body (2) to close the gas passage (1.1). The valve body (2) has at least one gas opening (2.1) and a diaphragm (2.2) permeable to a gaseous medium, the gas opening (2.1) being sealed by the diaphragm (2.2). The diaphragm (2.2) covers the opening (2.1) of the valve body (2) such that only gas permeating the diaphragm (2.2) can flow through the opening (2.1). The diaphragm (2.2) is impermeable to liquids. The safety of the electrochemical device is improved by stabilizing and reducing the risk of condensation inside the housing (5). For this purpose, a diaphragm (2.2) is arranged on top of the valve body (2).