The optical switching properties of a solid state device based on Ho0.6 Mm0.4 Co2 (HMC) alloy thin film as a switching active layer, water pretreated Nafion membrane as a solid electrolyte, and a transparent conducting indium tin oxide (ITO) as a counterelectrode are investigated. The device is simple and has a reduced layer sequence of HMC/Pd/Nafion/ITO. The reversible optical switching of this device has been studied during electrochemical galvanostatic charging-discharging as well as cyclic voltammetric measurements. Further, the optical switching durability of the device has been tested by repeated electrochemical hydrogenation-dehydrogenation, and the variations in the optical switching properties are discussed. The special characteristic of the device is that it can reversibly switch between a metallic reflecting state and a semiconducting transparent state by a small reversible applied current/voltage indicating the potential substitution for conventional electrochromic devices. © 2008 American Institute of Physics.