Using the invention, it is possible to connect an additional electric power generating device (generally renewable energy) to an existing ordinary connection (generally the municipal power grid). As a result, it is no longer necessary to use expensive power from non-renewable sources. The switch has a second power source option and, as such, the design of the equipment is made easy and the user's financial investment can be tailored to his/her means. Said novel switch switches to a second power source, optionally the power grid, when the added source (a battery) has discharged to a maximum recommended level. Therefore, for the same cited preferred use, days with high solar radiation will provide longer operating times without using mains power than days with low solar intensity which will provide shorter operating times. In both cases, the lamp will light up throughout the entire cycle (all night).