Water heater repairs are typically safe to perform if the unit is unplugged before being opened. Those working on gas units also need to make sure the gas valve is properly closed.
Most of the components of water heaters are located outside the unit, so accessing them is generally simple. Thermostats, for example, are located at the top and bottom of water heater and can be accessed by removing a panel. However, some of the electrical components of water heaters must be treated with caution even if the unit is unplugged. Capacitors can store a significant amount of energy even long after being disconnected from the power source, and they can shock people who touch them if they're not properly discharged.